@aws-sdk/client-mwaa 3.476.0 → 3.478.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.
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListEnvironments = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListEnvironmentsCommand_1 = require("../commands/ListEnvironmentsCommand");
5
6
  const MWAAClient_1 = require("../MWAAClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListEnvironmentsCommand_1.ListEnvironmentsCommand(input), ...args);
8
- };
9
- async function* paginateListEnvironments(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof MWAAClient_1.MWAAClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected MWAA | MWAAClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListEnvironments = paginateListEnvironments;
7
+ exports.paginateListEnvironments = (0, core_1.createPaginator)(MWAAClient_1.MWAAClient, ListEnvironmentsCommand_1.ListEnvironmentsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,15 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateEnvironmentCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_PublishMetricsCommand = exports.de_ListTagsForResourceCommand = exports.de_ListEnvironmentsCommand = exports.de_GetEnvironmentCommand = exports.de_DeleteEnvironmentCommand = exports.de_CreateWebLoginTokenCommand = exports.de_CreateEnvironmentCommand = exports.de_CreateCliTokenCommand = exports.se_UpdateEnvironmentCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_PublishMetricsCommand = exports.se_ListTagsForResourceCommand = exports.se_ListEnvironmentsCommand = exports.se_GetEnvironmentCommand = exports.se_DeleteEnvironmentCommand = exports.se_CreateWebLoginTokenCommand = exports.se_CreateEnvironmentCommand = exports.se_CreateCliTokenCommand = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const protocol_http_1 = require("@smithy/protocol-http");
5
6
  const smithy_client_1 = require("@smithy/smithy-client");
6
7
  const models_0_1 = require("../models/models_0");
7
8
  const MWAAServiceException_1 = require("../models/MWAAServiceException");
8
9
  const se_CreateCliTokenCommand = async (input, context) => {
9
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
+ const b = (0, core_1.requestBuilder)(input, context);
10
11
  const headers = {};
11
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clitoken/{Name}";
12
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
12
+ b.bp("/clitoken/{Name}");
13
+ b.p("Name", () => input.Name, "{Name}", false);
13
14
  let body;
14
15
  let { hostname: resolvedHostname } = await context.endpoint();
15
16
  if (context.disableHostPrefix !== true) {
@@ -18,24 +19,18 @@ const se_CreateCliTokenCommand = async (input, context) => {
18
19
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
19
20
  }
20
21
  }
21
- return new protocol_http_1.HttpRequest({
22
- protocol,
23
- hostname: resolvedHostname,
24
- port,
25
- method: "POST",
26
- headers,
27
- path: resolvedPath,
28
- body,
29
- });
22
+ b.hn(resolvedHostname);
23
+ b.m("POST").h(headers).b(body);
24
+ return b.build();
30
25
  };
31
26
  exports.se_CreateCliTokenCommand = se_CreateCliTokenCommand;
32
27
  const se_CreateEnvironmentCommand = async (input, context) => {
33
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
28
+ const b = (0, core_1.requestBuilder)(input, context);
34
29
  const headers = {
35
30
  "content-type": "application/json",
36
31
  };
37
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{Name}";
38
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
32
+ b.bp("/environments/{Name}");
33
+ b.p("Name", () => input.Name, "{Name}", false);
39
34
  let body;
40
35
  body = JSON.stringify((0, smithy_client_1.take)(input, {
41
36
  AirflowConfigurationOptions: (_) => (0, smithy_client_1._json)(_),
@@ -68,22 +63,16 @@ const se_CreateEnvironmentCommand = async (input, context) => {
68
63
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
69
64
  }
70
65
  }
71
- return new protocol_http_1.HttpRequest({
72
- protocol,
73
- hostname: resolvedHostname,
74
- port,
75
- method: "PUT",
76
- headers,
77
- path: resolvedPath,
78
- body,
79
- });
66
+ b.hn(resolvedHostname);
67
+ b.m("PUT").h(headers).b(body);
68
+ return b.build();
80
69
  };
81
70
  exports.se_CreateEnvironmentCommand = se_CreateEnvironmentCommand;
82
71
  const se_CreateWebLoginTokenCommand = async (input, context) => {
83
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
72
+ const b = (0, core_1.requestBuilder)(input, context);
84
73
  const headers = {};
85
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/webtoken/{Name}";
86
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
74
+ b.bp("/webtoken/{Name}");
75
+ b.p("Name", () => input.Name, "{Name}", false);
87
76
  let body;
88
77
  let { hostname: resolvedHostname } = await context.endpoint();
89
78
  if (context.disableHostPrefix !== true) {
@@ -92,22 +81,16 @@ const se_CreateWebLoginTokenCommand = async (input, context) => {
92
81
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
93
82
  }
94
83
  }
95
- return new protocol_http_1.HttpRequest({
96
- protocol,
97
- hostname: resolvedHostname,
98
- port,
99
- method: "POST",
100
- headers,
101
- path: resolvedPath,
102
- body,
103
- });
84
+ b.hn(resolvedHostname);
85
+ b.m("POST").h(headers).b(body);
86
+ return b.build();
104
87
  };
105
88
  exports.se_CreateWebLoginTokenCommand = se_CreateWebLoginTokenCommand;
106
89
  const se_DeleteEnvironmentCommand = async (input, context) => {
107
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
90
+ const b = (0, core_1.requestBuilder)(input, context);
108
91
  const headers = {};
109
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{Name}";
110
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
92
+ b.bp("/environments/{Name}");
93
+ b.p("Name", () => input.Name, "{Name}", false);
111
94
  let body;
112
95
  let { hostname: resolvedHostname } = await context.endpoint();
113
96
  if (context.disableHostPrefix !== true) {
@@ -116,22 +99,16 @@ const se_DeleteEnvironmentCommand = async (input, context) => {
116
99
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
117
100
  }
118
101
  }
119
- return new protocol_http_1.HttpRequest({
120
- protocol,
121
- hostname: resolvedHostname,
122
- port,
123
- method: "DELETE",
124
- headers,
125
- path: resolvedPath,
126
- body,
127
- });
102
+ b.hn(resolvedHostname);
103
+ b.m("DELETE").h(headers).b(body);
104
+ return b.build();
128
105
  };
129
106
  exports.se_DeleteEnvironmentCommand = se_DeleteEnvironmentCommand;
130
107
  const se_GetEnvironmentCommand = async (input, context) => {
131
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
108
+ const b = (0, core_1.requestBuilder)(input, context);
132
109
  const headers = {};
133
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{Name}";
134
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
110
+ b.bp("/environments/{Name}");
111
+ b.p("Name", () => input.Name, "{Name}", false);
135
112
  let body;
136
113
  let { hostname: resolvedHostname } = await context.endpoint();
137
114
  if (context.disableHostPrefix !== true) {
@@ -140,24 +117,18 @@ const se_GetEnvironmentCommand = async (input, context) => {
140
117
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
141
118
  }
142
119
  }
143
- return new protocol_http_1.HttpRequest({
144
- protocol,
145
- hostname: resolvedHostname,
146
- port,
147
- method: "GET",
148
- headers,
149
- path: resolvedPath,
150
- body,
151
- });
120
+ b.hn(resolvedHostname);
121
+ b.m("GET").h(headers).b(body);
122
+ return b.build();
152
123
  };
153
124
  exports.se_GetEnvironmentCommand = se_GetEnvironmentCommand;
154
125
  const se_ListEnvironmentsCommand = async (input, context) => {
155
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
126
+ const b = (0, core_1.requestBuilder)(input, context);
156
127
  const headers = {};
157
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments";
128
+ b.bp("/environments");
158
129
  const query = (0, smithy_client_1.map)({
159
- NextToken: [, input.NextToken],
160
- MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
130
+ [_NT]: [, input[_NT]],
131
+ [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
161
132
  });
162
133
  let body;
163
134
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -167,23 +138,16 @@ const se_ListEnvironmentsCommand = async (input, context) => {
167
138
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
168
139
  }
169
140
  }
170
- return new protocol_http_1.HttpRequest({
171
- protocol,
172
- hostname: resolvedHostname,
173
- port,
174
- method: "GET",
175
- headers,
176
- path: resolvedPath,
177
- query,
178
- body,
179
- });
141
+ b.hn(resolvedHostname);
142
+ b.m("GET").h(headers).q(query).b(body);
143
+ return b.build();
180
144
  };
181
145
  exports.se_ListEnvironmentsCommand = se_ListEnvironmentsCommand;
182
146
  const se_ListTagsForResourceCommand = async (input, context) => {
183
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
147
+ const b = (0, core_1.requestBuilder)(input, context);
184
148
  const headers = {};
185
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
186
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
149
+ b.bp("/tags/{ResourceArn}");
150
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
187
151
  let body;
188
152
  let { hostname: resolvedHostname } = await context.endpoint();
189
153
  if (context.disableHostPrefix !== true) {
@@ -192,24 +156,18 @@ const se_ListTagsForResourceCommand = async (input, context) => {
192
156
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
193
157
  }
194
158
  }
195
- return new protocol_http_1.HttpRequest({
196
- protocol,
197
- hostname: resolvedHostname,
198
- port,
199
- method: "GET",
200
- headers,
201
- path: resolvedPath,
202
- body,
203
- });
159
+ b.hn(resolvedHostname);
160
+ b.m("GET").h(headers).b(body);
161
+ return b.build();
204
162
  };
205
163
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
206
164
  const se_PublishMetricsCommand = async (input, context) => {
207
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
165
+ const b = (0, core_1.requestBuilder)(input, context);
208
166
  const headers = {
209
167
  "content-type": "application/json",
210
168
  };
211
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metrics/environments/{EnvironmentName}";
212
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "EnvironmentName", () => input.EnvironmentName, "{EnvironmentName}", false);
169
+ b.bp("/metrics/environments/{EnvironmentName}");
170
+ b.p("EnvironmentName", () => input.EnvironmentName, "{EnvironmentName}", false);
213
171
  let body;
214
172
  body = JSON.stringify((0, smithy_client_1.take)(input, {
215
173
  MetricData: (_) => se_MetricData(_, context),
@@ -221,24 +179,18 @@ const se_PublishMetricsCommand = async (input, context) => {
221
179
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
222
180
  }
223
181
  }
224
- return new protocol_http_1.HttpRequest({
225
- protocol,
226
- hostname: resolvedHostname,
227
- port,
228
- method: "POST",
229
- headers,
230
- path: resolvedPath,
231
- body,
232
- });
182
+ b.hn(resolvedHostname);
183
+ b.m("POST").h(headers).b(body);
184
+ return b.build();
233
185
  };
234
186
  exports.se_PublishMetricsCommand = se_PublishMetricsCommand;
235
187
  const se_TagResourceCommand = async (input, context) => {
236
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
188
+ const b = (0, core_1.requestBuilder)(input, context);
237
189
  const headers = {
238
190
  "content-type": "application/json",
239
191
  };
240
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
241
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
192
+ b.bp("/tags/{ResourceArn}");
193
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
242
194
  let body;
243
195
  body = JSON.stringify((0, smithy_client_1.take)(input, {
244
196
  Tags: (_) => (0, smithy_client_1._json)(_),
@@ -250,26 +202,20 @@ const se_TagResourceCommand = async (input, context) => {
250
202
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
251
203
  }
252
204
  }
253
- return new protocol_http_1.HttpRequest({
254
- protocol,
255
- hostname: resolvedHostname,
256
- port,
257
- method: "POST",
258
- headers,
259
- path: resolvedPath,
260
- body,
261
- });
205
+ b.hn(resolvedHostname);
206
+ b.m("POST").h(headers).b(body);
207
+ return b.build();
262
208
  };
263
209
  exports.se_TagResourceCommand = se_TagResourceCommand;
264
210
  const se_UntagResourceCommand = async (input, context) => {
265
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
211
+ const b = (0, core_1.requestBuilder)(input, context);
266
212
  const headers = {};
267
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
268
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
213
+ b.bp("/tags/{ResourceArn}");
214
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
269
215
  const query = (0, smithy_client_1.map)({
270
- tagKeys: [
216
+ [_tK]: [
271
217
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
272
- () => (input.tagKeys || []).map((_entry) => _entry),
218
+ () => (input[_tK] || []).map((_entry) => _entry),
273
219
  ],
274
220
  });
275
221
  let body;
@@ -280,25 +226,18 @@ const se_UntagResourceCommand = async (input, context) => {
280
226
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
281
227
  }
282
228
  }
283
- return new protocol_http_1.HttpRequest({
284
- protocol,
285
- hostname: resolvedHostname,
286
- port,
287
- method: "DELETE",
288
- headers,
289
- path: resolvedPath,
290
- query,
291
- body,
292
- });
229
+ b.hn(resolvedHostname);
230
+ b.m("DELETE").h(headers).q(query).b(body);
231
+ return b.build();
293
232
  };
294
233
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
295
234
  const se_UpdateEnvironmentCommand = async (input, context) => {
296
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
235
+ const b = (0, core_1.requestBuilder)(input, context);
297
236
  const headers = {
298
237
  "content-type": "application/json",
299
238
  };
300
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{Name}";
301
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
239
+ b.bp("/environments/{Name}");
240
+ b.p("Name", () => input.Name, "{Name}", false);
302
241
  let body;
303
242
  body = JSON.stringify((0, smithy_client_1.take)(input, {
304
243
  AirflowConfigurationOptions: (_) => (0, smithy_client_1._json)(_),
@@ -328,15 +267,9 @@ const se_UpdateEnvironmentCommand = async (input, context) => {
328
267
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
329
268
  }
330
269
  }
331
- return new protocol_http_1.HttpRequest({
332
- protocol,
333
- hostname: resolvedHostname,
334
- port,
335
- method: "PATCH",
336
- headers,
337
- path: resolvedPath,
338
- body,
339
- });
270
+ b.hn(resolvedHostname);
271
+ b.m("PATCH").h(headers).b(body);
272
+ return b.build();
340
273
  };
341
274
  exports.se_UpdateEnvironmentCommand = se_UpdateEnvironmentCommand;
342
275
  const de_CreateCliTokenCommand = async (output, context) => {
@@ -888,6 +821,9 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
888
821
  value !== "" &&
889
822
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
890
823
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
824
+ const _MR = "MaxResults";
825
+ const _NT = "NextToken";
826
+ const _tK = "tagKeys";
891
827
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
892
828
  if (encoded.length) {
893
829
  return JSON.parse(encoded);
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListEnvironmentsCommand, } from "../commands/ListEnvironmentsCommand";
2
3
  import { MWAAClient } from "../MWAAClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListEnvironmentsCommand(input), ...args);
5
- };
6
- export async function* paginateListEnvironments(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof MWAAClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected MWAA | MWAAClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListEnvironments = createPaginator(MWAAClient, ListEnvironmentsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,12 +1,13 @@
1
- import { HttpRequest as __HttpRequest, isValidHostname as __isValidHostname, } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { isValidHostname as __isValidHostname, } from "@smithy/protocol-http";
3
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
3
4
  import { AccessDeniedException, InternalServerException, ResourceNotFoundException, ValidationException, } from "../models/models_0";
4
5
  import { MWAAServiceException as __BaseException } from "../models/MWAAServiceException";
5
6
  export const se_CreateCliTokenCommand = async (input, context) => {
6
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
+ const b = rb(input, context);
7
8
  const headers = {};
8
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clitoken/{Name}";
9
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
9
+ b.bp("/clitoken/{Name}");
10
+ b.p("Name", () => input.Name, "{Name}", false);
10
11
  let body;
11
12
  let { hostname: resolvedHostname } = await context.endpoint();
12
13
  if (context.disableHostPrefix !== true) {
@@ -15,23 +16,17 @@ export const se_CreateCliTokenCommand = async (input, context) => {
15
16
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
16
17
  }
17
18
  }
18
- return new __HttpRequest({
19
- protocol,
20
- hostname: resolvedHostname,
21
- port,
22
- method: "POST",
23
- headers,
24
- path: resolvedPath,
25
- body,
26
- });
19
+ b.hn(resolvedHostname);
20
+ b.m("POST").h(headers).b(body);
21
+ return b.build();
27
22
  };
28
23
  export const se_CreateEnvironmentCommand = async (input, context) => {
29
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
24
+ const b = rb(input, context);
30
25
  const headers = {
31
26
  "content-type": "application/json",
32
27
  };
33
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{Name}";
34
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
28
+ b.bp("/environments/{Name}");
29
+ b.p("Name", () => input.Name, "{Name}", false);
35
30
  let body;
36
31
  body = JSON.stringify(take(input, {
37
32
  AirflowConfigurationOptions: (_) => _json(_),
@@ -64,21 +59,15 @@ export const se_CreateEnvironmentCommand = async (input, context) => {
64
59
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
65
60
  }
66
61
  }
67
- return new __HttpRequest({
68
- protocol,
69
- hostname: resolvedHostname,
70
- port,
71
- method: "PUT",
72
- headers,
73
- path: resolvedPath,
74
- body,
75
- });
62
+ b.hn(resolvedHostname);
63
+ b.m("PUT").h(headers).b(body);
64
+ return b.build();
76
65
  };
77
66
  export const se_CreateWebLoginTokenCommand = async (input, context) => {
78
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
67
+ const b = rb(input, context);
79
68
  const headers = {};
80
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/webtoken/{Name}";
81
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
69
+ b.bp("/webtoken/{Name}");
70
+ b.p("Name", () => input.Name, "{Name}", false);
82
71
  let body;
83
72
  let { hostname: resolvedHostname } = await context.endpoint();
84
73
  if (context.disableHostPrefix !== true) {
@@ -87,21 +76,15 @@ export const se_CreateWebLoginTokenCommand = async (input, context) => {
87
76
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
88
77
  }
89
78
  }
90
- return new __HttpRequest({
91
- protocol,
92
- hostname: resolvedHostname,
93
- port,
94
- method: "POST",
95
- headers,
96
- path: resolvedPath,
97
- body,
98
- });
79
+ b.hn(resolvedHostname);
80
+ b.m("POST").h(headers).b(body);
81
+ return b.build();
99
82
  };
100
83
  export const se_DeleteEnvironmentCommand = async (input, context) => {
101
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
84
+ const b = rb(input, context);
102
85
  const headers = {};
103
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{Name}";
104
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
86
+ b.bp("/environments/{Name}");
87
+ b.p("Name", () => input.Name, "{Name}", false);
105
88
  let body;
106
89
  let { hostname: resolvedHostname } = await context.endpoint();
107
90
  if (context.disableHostPrefix !== true) {
@@ -110,21 +93,15 @@ export const se_DeleteEnvironmentCommand = async (input, context) => {
110
93
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
111
94
  }
112
95
  }
113
- return new __HttpRequest({
114
- protocol,
115
- hostname: resolvedHostname,
116
- port,
117
- method: "DELETE",
118
- headers,
119
- path: resolvedPath,
120
- body,
121
- });
96
+ b.hn(resolvedHostname);
97
+ b.m("DELETE").h(headers).b(body);
98
+ return b.build();
122
99
  };
123
100
  export const se_GetEnvironmentCommand = async (input, context) => {
124
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
101
+ const b = rb(input, context);
125
102
  const headers = {};
126
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{Name}";
127
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
103
+ b.bp("/environments/{Name}");
104
+ b.p("Name", () => input.Name, "{Name}", false);
128
105
  let body;
129
106
  let { hostname: resolvedHostname } = await context.endpoint();
130
107
  if (context.disableHostPrefix !== true) {
@@ -133,23 +110,17 @@ export const se_GetEnvironmentCommand = async (input, context) => {
133
110
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
134
111
  }
135
112
  }
136
- return new __HttpRequest({
137
- protocol,
138
- hostname: resolvedHostname,
139
- port,
140
- method: "GET",
141
- headers,
142
- path: resolvedPath,
143
- body,
144
- });
113
+ b.hn(resolvedHostname);
114
+ b.m("GET").h(headers).b(body);
115
+ return b.build();
145
116
  };
146
117
  export const se_ListEnvironmentsCommand = async (input, context) => {
147
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
118
+ const b = rb(input, context);
148
119
  const headers = {};
149
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments";
120
+ b.bp("/environments");
150
121
  const query = map({
151
- NextToken: [, input.NextToken],
152
- MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
122
+ [_NT]: [, input[_NT]],
123
+ [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
153
124
  });
154
125
  let body;
155
126
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -159,22 +130,15 @@ export const se_ListEnvironmentsCommand = async (input, context) => {
159
130
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
160
131
  }
161
132
  }
162
- return new __HttpRequest({
163
- protocol,
164
- hostname: resolvedHostname,
165
- port,
166
- method: "GET",
167
- headers,
168
- path: resolvedPath,
169
- query,
170
- body,
171
- });
133
+ b.hn(resolvedHostname);
134
+ b.m("GET").h(headers).q(query).b(body);
135
+ return b.build();
172
136
  };
173
137
  export const se_ListTagsForResourceCommand = async (input, context) => {
174
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
138
+ const b = rb(input, context);
175
139
  const headers = {};
176
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
177
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
140
+ b.bp("/tags/{ResourceArn}");
141
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
178
142
  let body;
179
143
  let { hostname: resolvedHostname } = await context.endpoint();
180
144
  if (context.disableHostPrefix !== true) {
@@ -183,23 +147,17 @@ export const se_ListTagsForResourceCommand = async (input, context) => {
183
147
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
184
148
  }
185
149
  }
186
- return new __HttpRequest({
187
- protocol,
188
- hostname: resolvedHostname,
189
- port,
190
- method: "GET",
191
- headers,
192
- path: resolvedPath,
193
- body,
194
- });
150
+ b.hn(resolvedHostname);
151
+ b.m("GET").h(headers).b(body);
152
+ return b.build();
195
153
  };
196
154
  export const se_PublishMetricsCommand = async (input, context) => {
197
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
155
+ const b = rb(input, context);
198
156
  const headers = {
199
157
  "content-type": "application/json",
200
158
  };
201
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metrics/environments/{EnvironmentName}";
202
- resolvedPath = __resolvedPath(resolvedPath, input, "EnvironmentName", () => input.EnvironmentName, "{EnvironmentName}", false);
159
+ b.bp("/metrics/environments/{EnvironmentName}");
160
+ b.p("EnvironmentName", () => input.EnvironmentName, "{EnvironmentName}", false);
203
161
  let body;
204
162
  body = JSON.stringify(take(input, {
205
163
  MetricData: (_) => se_MetricData(_, context),
@@ -211,23 +169,17 @@ export const se_PublishMetricsCommand = async (input, context) => {
211
169
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
212
170
  }
213
171
  }
214
- return new __HttpRequest({
215
- protocol,
216
- hostname: resolvedHostname,
217
- port,
218
- method: "POST",
219
- headers,
220
- path: resolvedPath,
221
- body,
222
- });
172
+ b.hn(resolvedHostname);
173
+ b.m("POST").h(headers).b(body);
174
+ return b.build();
223
175
  };
224
176
  export const se_TagResourceCommand = async (input, context) => {
225
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
177
+ const b = rb(input, context);
226
178
  const headers = {
227
179
  "content-type": "application/json",
228
180
  };
229
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
230
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
181
+ b.bp("/tags/{ResourceArn}");
182
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
231
183
  let body;
232
184
  body = JSON.stringify(take(input, {
233
185
  Tags: (_) => _json(_),
@@ -239,25 +191,19 @@ export const se_TagResourceCommand = async (input, context) => {
239
191
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
240
192
  }
241
193
  }
242
- return new __HttpRequest({
243
- protocol,
244
- hostname: resolvedHostname,
245
- port,
246
- method: "POST",
247
- headers,
248
- path: resolvedPath,
249
- body,
250
- });
194
+ b.hn(resolvedHostname);
195
+ b.m("POST").h(headers).b(body);
196
+ return b.build();
251
197
  };
252
198
  export const se_UntagResourceCommand = async (input, context) => {
253
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
199
+ const b = rb(input, context);
254
200
  const headers = {};
255
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
256
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
201
+ b.bp("/tags/{ResourceArn}");
202
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
257
203
  const query = map({
258
- tagKeys: [
204
+ [_tK]: [
259
205
  __expectNonNull(input.tagKeys, `tagKeys`) != null,
260
- () => (input.tagKeys || []).map((_entry) => _entry),
206
+ () => (input[_tK] || []).map((_entry) => _entry),
261
207
  ],
262
208
  });
263
209
  let body;
@@ -268,24 +214,17 @@ export const se_UntagResourceCommand = async (input, context) => {
268
214
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
269
215
  }
270
216
  }
271
- return new __HttpRequest({
272
- protocol,
273
- hostname: resolvedHostname,
274
- port,
275
- method: "DELETE",
276
- headers,
277
- path: resolvedPath,
278
- query,
279
- body,
280
- });
217
+ b.hn(resolvedHostname);
218
+ b.m("DELETE").h(headers).q(query).b(body);
219
+ return b.build();
281
220
  };
282
221
  export const se_UpdateEnvironmentCommand = async (input, context) => {
283
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
222
+ const b = rb(input, context);
284
223
  const headers = {
285
224
  "content-type": "application/json",
286
225
  };
287
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{Name}";
288
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
226
+ b.bp("/environments/{Name}");
227
+ b.p("Name", () => input.Name, "{Name}", false);
289
228
  let body;
290
229
  body = JSON.stringify(take(input, {
291
230
  AirflowConfigurationOptions: (_) => _json(_),
@@ -315,15 +254,9 @@ export const se_UpdateEnvironmentCommand = async (input, context) => {
315
254
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
316
255
  }
317
256
  }
318
- return new __HttpRequest({
319
- protocol,
320
- hostname: resolvedHostname,
321
- port,
322
- method: "PATCH",
323
- headers,
324
- path: resolvedPath,
325
- body,
326
- });
257
+ b.hn(resolvedHostname);
258
+ b.m("PATCH").h(headers).b(body);
259
+ return b.build();
327
260
  };
328
261
  export const de_CreateCliTokenCommand = async (output, context) => {
329
262
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -863,6 +796,9 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
863
796
  value !== "" &&
864
797
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
865
798
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
799
+ const _MR = "MaxResults";
800
+ const _NT = "NextToken";
801
+ const _tK = "tagKeys";
866
802
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
867
803
  if (encoded.length) {
868
804
  return JSON.parse(encoded);
@@ -4,4 +4,4 @@ import { MWAAPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListEnvironments(config: MWAAPaginationConfiguration, input: ListEnvironmentsCommandInput, ...additionalArguments: any): Paginator<ListEnvironmentsCommandOutput>;
7
+ export declare const paginateListEnvironments: (config: MWAAPaginationConfiguration, input: ListEnvironmentsCommandInput, ...rest: any[]) => Paginator<ListEnvironmentsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListEnvironmentsCommandOutput,
5
5
  } from "../commands/ListEnvironmentsCommand";
6
6
  import { MWAAPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListEnvironments(
7
+ export declare const paginateListEnvironments: (
8
8
  config: MWAAPaginationConfiguration,
9
9
  input: ListEnvironmentsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListEnvironmentsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListEnvironmentsCommandOutput>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-mwaa",
3
3
  "description": "AWS SDK for JavaScript Mwaa Client for Node.js, Browser and React Native",
4
- "version": "3.476.0",
4
+ "version": "3.478.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,20 +20,21 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.476.0",
24
- "@aws-sdk/core": "3.476.0",
25
- "@aws-sdk/credential-provider-node": "3.476.0",
23
+ "@aws-sdk/client-sts": "3.478.0",
24
+ "@aws-sdk/core": "3.477.0",
25
+ "@aws-sdk/credential-provider-node": "3.478.0",
26
26
  "@aws-sdk/middleware-host-header": "3.468.0",
27
27
  "@aws-sdk/middleware-logger": "3.468.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.468.0",
29
29
  "@aws-sdk/middleware-signing": "3.468.0",
30
- "@aws-sdk/middleware-user-agent": "3.470.0",
30
+ "@aws-sdk/middleware-user-agent": "3.478.0",
31
31
  "@aws-sdk/region-config-resolver": "3.470.0",
32
32
  "@aws-sdk/types": "3.468.0",
33
- "@aws-sdk/util-endpoints": "3.470.0",
33
+ "@aws-sdk/util-endpoints": "3.478.0",
34
34
  "@aws-sdk/util-user-agent-browser": "3.468.0",
35
35
  "@aws-sdk/util-user-agent-node": "3.470.0",
36
36
  "@smithy/config-resolver": "^2.0.21",
37
+ "@smithy/core": "^1.2.0",
37
38
  "@smithy/fetch-http-handler": "^2.3.1",
38
39
  "@smithy/hash-node": "^2.0.17",
39
40
  "@smithy/invalid-dependency": "^2.0.15",