@aws-sdk/client-emr-containers 3.476.0 → 3.477.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.
@@ -2,36 +2,28 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StartJobRunCommand = exports.de_ListVirtualClustersCommand = exports.de_ListTagsForResourceCommand = exports.de_ListManagedEndpointsCommand = exports.de_ListJobTemplatesCommand = exports.de_ListJobRunsCommand = exports.de_GetManagedEndpointSessionCredentialsCommand = exports.de_DescribeVirtualClusterCommand = exports.de_DescribeManagedEndpointCommand = exports.de_DescribeJobTemplateCommand = exports.de_DescribeJobRunCommand = exports.de_DeleteVirtualClusterCommand = exports.de_DeleteManagedEndpointCommand = exports.de_DeleteJobTemplateCommand = exports.de_CreateVirtualClusterCommand = exports.de_CreateManagedEndpointCommand = exports.de_CreateJobTemplateCommand = exports.de_CancelJobRunCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StartJobRunCommand = exports.se_ListVirtualClustersCommand = exports.se_ListTagsForResourceCommand = exports.se_ListManagedEndpointsCommand = exports.se_ListJobTemplatesCommand = exports.se_ListJobRunsCommand = exports.se_GetManagedEndpointSessionCredentialsCommand = exports.se_DescribeVirtualClusterCommand = exports.se_DescribeManagedEndpointCommand = exports.se_DescribeJobTemplateCommand = exports.se_DescribeJobRunCommand = exports.se_DeleteVirtualClusterCommand = exports.se_DeleteManagedEndpointCommand = exports.se_DeleteJobTemplateCommand = exports.se_CreateVirtualClusterCommand = exports.se_CreateManagedEndpointCommand = exports.se_CreateJobTemplateCommand = exports.se_CancelJobRunCommand = void 0;
4
4
  const core_1 = require("@aws-sdk/core");
5
- const protocol_http_1 = require("@smithy/protocol-http");
5
+ const core_2 = require("@smithy/core");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  const uuid_1 = require("uuid");
8
8
  const EMRContainersServiceException_1 = require("../models/EMRContainersServiceException");
9
9
  const models_0_1 = require("../models/models_0");
10
10
  const se_CancelJobRunCommand = async (input, context) => {
11
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
11
+ const b = (0, core_2.requestBuilder)(input, context);
12
12
  const headers = {};
13
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
14
- "/virtualclusters/{virtualClusterId}/jobruns/{id}";
15
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
16
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
13
+ b.bp("/virtualclusters/{virtualClusterId}/jobruns/{id}");
14
+ b.p("id", () => input.id, "{id}", false);
15
+ b.p("virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
17
16
  let body;
18
- return new protocol_http_1.HttpRequest({
19
- protocol,
20
- hostname,
21
- port,
22
- method: "DELETE",
23
- headers,
24
- path: resolvedPath,
25
- body,
26
- });
17
+ b.m("DELETE").h(headers).b(body);
18
+ return b.build();
27
19
  };
28
20
  exports.se_CancelJobRunCommand = se_CancelJobRunCommand;
29
21
  const se_CreateJobTemplateCommand = async (input, context) => {
30
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
22
+ const b = (0, core_2.requestBuilder)(input, context);
31
23
  const headers = {
32
24
  "content-type": "application/json",
33
25
  };
34
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobtemplates";
26
+ b.bp("/jobtemplates");
35
27
  let body;
36
28
  body = JSON.stringify((0, smithy_client_1.take)(input, {
37
29
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -40,25 +32,17 @@ const se_CreateJobTemplateCommand = async (input, context) => {
40
32
  name: [],
41
33
  tags: (_) => (0, smithy_client_1._json)(_),
42
34
  }));
43
- return new protocol_http_1.HttpRequest({
44
- protocol,
45
- hostname,
46
- port,
47
- method: "POST",
48
- headers,
49
- path: resolvedPath,
50
- body,
51
- });
35
+ b.m("POST").h(headers).b(body);
36
+ return b.build();
52
37
  };
53
38
  exports.se_CreateJobTemplateCommand = se_CreateJobTemplateCommand;
54
39
  const se_CreateManagedEndpointCommand = async (input, context) => {
55
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
40
+ const b = (0, core_2.requestBuilder)(input, context);
56
41
  const headers = {
57
42
  "content-type": "application/json",
58
43
  };
59
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
60
- "/virtualclusters/{virtualClusterId}/endpoints";
61
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
44
+ b.bp("/virtualclusters/{virtualClusterId}/endpoints");
45
+ b.p("virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
62
46
  let body;
63
47
  body = JSON.stringify((0, smithy_client_1.take)(input, {
64
48
  certificateArn: [],
@@ -70,23 +54,16 @@ const se_CreateManagedEndpointCommand = async (input, context) => {
70
54
  tags: (_) => (0, smithy_client_1._json)(_),
71
55
  type: [],
72
56
  }));
73
- return new protocol_http_1.HttpRequest({
74
- protocol,
75
- hostname,
76
- port,
77
- method: "POST",
78
- headers,
79
- path: resolvedPath,
80
- body,
81
- });
57
+ b.m("POST").h(headers).b(body);
58
+ return b.build();
82
59
  };
83
60
  exports.se_CreateManagedEndpointCommand = se_CreateManagedEndpointCommand;
84
61
  const se_CreateVirtualClusterCommand = async (input, context) => {
85
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
62
+ const b = (0, core_2.requestBuilder)(input, context);
86
63
  const headers = {
87
64
  "content-type": "application/json",
88
65
  };
89
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/virtualclusters";
66
+ b.bp("/virtualclusters");
90
67
  let body;
91
68
  body = JSON.stringify((0, smithy_client_1.take)(input, {
92
69
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -94,151 +71,91 @@ const se_CreateVirtualClusterCommand = async (input, context) => {
94
71
  name: [],
95
72
  tags: (_) => (0, smithy_client_1._json)(_),
96
73
  }));
97
- return new protocol_http_1.HttpRequest({
98
- protocol,
99
- hostname,
100
- port,
101
- method: "POST",
102
- headers,
103
- path: resolvedPath,
104
- body,
105
- });
74
+ b.m("POST").h(headers).b(body);
75
+ return b.build();
106
76
  };
107
77
  exports.se_CreateVirtualClusterCommand = se_CreateVirtualClusterCommand;
108
78
  const se_DeleteJobTemplateCommand = async (input, context) => {
109
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
79
+ const b = (0, core_2.requestBuilder)(input, context);
110
80
  const headers = {};
111
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobtemplates/{id}";
112
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
81
+ b.bp("/jobtemplates/{id}");
82
+ b.p("id", () => input.id, "{id}", false);
113
83
  let body;
114
- return new protocol_http_1.HttpRequest({
115
- protocol,
116
- hostname,
117
- port,
118
- method: "DELETE",
119
- headers,
120
- path: resolvedPath,
121
- body,
122
- });
84
+ b.m("DELETE").h(headers).b(body);
85
+ return b.build();
123
86
  };
124
87
  exports.se_DeleteJobTemplateCommand = se_DeleteJobTemplateCommand;
125
88
  const se_DeleteManagedEndpointCommand = async (input, context) => {
126
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
89
+ const b = (0, core_2.requestBuilder)(input, context);
127
90
  const headers = {};
128
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
129
- "/virtualclusters/{virtualClusterId}/endpoints/{id}";
130
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
131
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
91
+ b.bp("/virtualclusters/{virtualClusterId}/endpoints/{id}");
92
+ b.p("id", () => input.id, "{id}", false);
93
+ b.p("virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
132
94
  let body;
133
- return new protocol_http_1.HttpRequest({
134
- protocol,
135
- hostname,
136
- port,
137
- method: "DELETE",
138
- headers,
139
- path: resolvedPath,
140
- body,
141
- });
95
+ b.m("DELETE").h(headers).b(body);
96
+ return b.build();
142
97
  };
143
98
  exports.se_DeleteManagedEndpointCommand = se_DeleteManagedEndpointCommand;
144
99
  const se_DeleteVirtualClusterCommand = async (input, context) => {
145
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
100
+ const b = (0, core_2.requestBuilder)(input, context);
146
101
  const headers = {};
147
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/virtualclusters/{id}";
148
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
102
+ b.bp("/virtualclusters/{id}");
103
+ b.p("id", () => input.id, "{id}", false);
149
104
  let body;
150
- return new protocol_http_1.HttpRequest({
151
- protocol,
152
- hostname,
153
- port,
154
- method: "DELETE",
155
- headers,
156
- path: resolvedPath,
157
- body,
158
- });
105
+ b.m("DELETE").h(headers).b(body);
106
+ return b.build();
159
107
  };
160
108
  exports.se_DeleteVirtualClusterCommand = se_DeleteVirtualClusterCommand;
161
109
  const se_DescribeJobRunCommand = async (input, context) => {
162
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
110
+ const b = (0, core_2.requestBuilder)(input, context);
163
111
  const headers = {};
164
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
165
- "/virtualclusters/{virtualClusterId}/jobruns/{id}";
166
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
167
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
112
+ b.bp("/virtualclusters/{virtualClusterId}/jobruns/{id}");
113
+ b.p("id", () => input.id, "{id}", false);
114
+ b.p("virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
168
115
  let body;
169
- return new protocol_http_1.HttpRequest({
170
- protocol,
171
- hostname,
172
- port,
173
- method: "GET",
174
- headers,
175
- path: resolvedPath,
176
- body,
177
- });
116
+ b.m("GET").h(headers).b(body);
117
+ return b.build();
178
118
  };
179
119
  exports.se_DescribeJobRunCommand = se_DescribeJobRunCommand;
180
120
  const se_DescribeJobTemplateCommand = async (input, context) => {
181
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
121
+ const b = (0, core_2.requestBuilder)(input, context);
182
122
  const headers = {};
183
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobtemplates/{id}";
184
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
123
+ b.bp("/jobtemplates/{id}");
124
+ b.p("id", () => input.id, "{id}", false);
185
125
  let body;
186
- return new protocol_http_1.HttpRequest({
187
- protocol,
188
- hostname,
189
- port,
190
- method: "GET",
191
- headers,
192
- path: resolvedPath,
193
- body,
194
- });
126
+ b.m("GET").h(headers).b(body);
127
+ return b.build();
195
128
  };
196
129
  exports.se_DescribeJobTemplateCommand = se_DescribeJobTemplateCommand;
197
130
  const se_DescribeManagedEndpointCommand = async (input, context) => {
198
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
131
+ const b = (0, core_2.requestBuilder)(input, context);
199
132
  const headers = {};
200
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
201
- "/virtualclusters/{virtualClusterId}/endpoints/{id}";
202
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
203
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
133
+ b.bp("/virtualclusters/{virtualClusterId}/endpoints/{id}");
134
+ b.p("id", () => input.id, "{id}", false);
135
+ b.p("virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
204
136
  let body;
205
- return new protocol_http_1.HttpRequest({
206
- protocol,
207
- hostname,
208
- port,
209
- method: "GET",
210
- headers,
211
- path: resolvedPath,
212
- body,
213
- });
137
+ b.m("GET").h(headers).b(body);
138
+ return b.build();
214
139
  };
215
140
  exports.se_DescribeManagedEndpointCommand = se_DescribeManagedEndpointCommand;
216
141
  const se_DescribeVirtualClusterCommand = async (input, context) => {
217
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
142
+ const b = (0, core_2.requestBuilder)(input, context);
218
143
  const headers = {};
219
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/virtualclusters/{id}";
220
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
144
+ b.bp("/virtualclusters/{id}");
145
+ b.p("id", () => input.id, "{id}", false);
221
146
  let body;
222
- return new protocol_http_1.HttpRequest({
223
- protocol,
224
- hostname,
225
- port,
226
- method: "GET",
227
- headers,
228
- path: resolvedPath,
229
- body,
230
- });
147
+ b.m("GET").h(headers).b(body);
148
+ return b.build();
231
149
  };
232
150
  exports.se_DescribeVirtualClusterCommand = se_DescribeVirtualClusterCommand;
233
151
  const se_GetManagedEndpointSessionCredentialsCommand = async (input, context) => {
234
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
152
+ const b = (0, core_2.requestBuilder)(input, context);
235
153
  const headers = {
236
154
  "content-type": "application/json",
237
155
  };
238
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
239
- "/virtualclusters/{virtualClusterIdentifier}/endpoints/{endpointIdentifier}/credentials";
240
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "endpointIdentifier", () => input.endpointIdentifier, "{endpointIdentifier}", false);
241
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "virtualClusterIdentifier", () => input.virtualClusterIdentifier, "{virtualClusterIdentifier}", false);
156
+ b.bp("/virtualclusters/{virtualClusterIdentifier}/endpoints/{endpointIdentifier}/credentials");
157
+ b.p("endpointIdentifier", () => input.endpointIdentifier, "{endpointIdentifier}", false);
158
+ b.p("virtualClusterIdentifier", () => input.virtualClusterIdentifier, "{virtualClusterIdentifier}", false);
242
159
  let body;
243
160
  body = JSON.stringify((0, smithy_client_1.take)(input, {
244
161
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -247,169 +164,96 @@ const se_GetManagedEndpointSessionCredentialsCommand = async (input, context) =>
247
164
  executionRoleArn: [],
248
165
  logContext: [],
249
166
  }));
250
- return new protocol_http_1.HttpRequest({
251
- protocol,
252
- hostname,
253
- port,
254
- method: "POST",
255
- headers,
256
- path: resolvedPath,
257
- body,
258
- });
167
+ b.m("POST").h(headers).b(body);
168
+ return b.build();
259
169
  };
260
170
  exports.se_GetManagedEndpointSessionCredentialsCommand = se_GetManagedEndpointSessionCredentialsCommand;
261
171
  const se_ListJobRunsCommand = async (input, context) => {
262
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
172
+ const b = (0, core_2.requestBuilder)(input, context);
263
173
  const headers = {};
264
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
265
- "/virtualclusters/{virtualClusterId}/jobruns";
266
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
174
+ b.bp("/virtualclusters/{virtualClusterId}/jobruns");
175
+ b.p("virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
267
176
  const query = (0, smithy_client_1.map)({
268
- createdBefore: [
269
- () => input.createdBefore !== void 0,
270
- () => (input.createdBefore.toISOString().split(".")[0] + "Z").toString(),
271
- ],
272
- createdAfter: [
273
- () => input.createdAfter !== void 0,
274
- () => (input.createdAfter.toISOString().split(".")[0] + "Z").toString(),
275
- ],
276
- name: [, input.name],
277
- states: [() => input.states !== void 0, () => (input.states || []).map((_entry) => _entry)],
278
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
279
- nextToken: [, input.nextToken],
177
+ [_cB]: [() => input.createdBefore !== void 0, () => (input[_cB].toISOString().split(".")[0] + "Z").toString()],
178
+ [_cA]: [() => input.createdAfter !== void 0, () => (input[_cA].toISOString().split(".")[0] + "Z").toString()],
179
+ [_n]: [, input[_n]],
180
+ [_s]: [() => input.states !== void 0, () => (input[_s] || []).map((_entry) => _entry)],
181
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
182
+ [_nT]: [, input[_nT]],
280
183
  });
281
184
  let body;
282
- return new protocol_http_1.HttpRequest({
283
- protocol,
284
- hostname,
285
- port,
286
- method: "GET",
287
- headers,
288
- path: resolvedPath,
289
- query,
290
- body,
291
- });
185
+ b.m("GET").h(headers).q(query).b(body);
186
+ return b.build();
292
187
  };
293
188
  exports.se_ListJobRunsCommand = se_ListJobRunsCommand;
294
189
  const se_ListJobTemplatesCommand = async (input, context) => {
295
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
190
+ const b = (0, core_2.requestBuilder)(input, context);
296
191
  const headers = {};
297
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobtemplates";
192
+ b.bp("/jobtemplates");
298
193
  const query = (0, smithy_client_1.map)({
299
- createdAfter: [
300
- () => input.createdAfter !== void 0,
301
- () => (input.createdAfter.toISOString().split(".")[0] + "Z").toString(),
302
- ],
303
- createdBefore: [
304
- () => input.createdBefore !== void 0,
305
- () => (input.createdBefore.toISOString().split(".")[0] + "Z").toString(),
306
- ],
307
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
308
- nextToken: [, input.nextToken],
194
+ [_cA]: [() => input.createdAfter !== void 0, () => (input[_cA].toISOString().split(".")[0] + "Z").toString()],
195
+ [_cB]: [() => input.createdBefore !== void 0, () => (input[_cB].toISOString().split(".")[0] + "Z").toString()],
196
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
197
+ [_nT]: [, input[_nT]],
309
198
  });
310
199
  let body;
311
- return new protocol_http_1.HttpRequest({
312
- protocol,
313
- hostname,
314
- port,
315
- method: "GET",
316
- headers,
317
- path: resolvedPath,
318
- query,
319
- body,
320
- });
200
+ b.m("GET").h(headers).q(query).b(body);
201
+ return b.build();
321
202
  };
322
203
  exports.se_ListJobTemplatesCommand = se_ListJobTemplatesCommand;
323
204
  const se_ListManagedEndpointsCommand = async (input, context) => {
324
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
205
+ const b = (0, core_2.requestBuilder)(input, context);
325
206
  const headers = {};
326
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
327
- "/virtualclusters/{virtualClusterId}/endpoints";
328
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
207
+ b.bp("/virtualclusters/{virtualClusterId}/endpoints");
208
+ b.p("virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
329
209
  const query = (0, smithy_client_1.map)({
330
- createdBefore: [
331
- () => input.createdBefore !== void 0,
332
- () => (input.createdBefore.toISOString().split(".")[0] + "Z").toString(),
333
- ],
334
- createdAfter: [
335
- () => input.createdAfter !== void 0,
336
- () => (input.createdAfter.toISOString().split(".")[0] + "Z").toString(),
337
- ],
338
- types: [() => input.types !== void 0, () => (input.types || []).map((_entry) => _entry)],
339
- states: [() => input.states !== void 0, () => (input.states || []).map((_entry) => _entry)],
340
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
341
- nextToken: [, input.nextToken],
210
+ [_cB]: [() => input.createdBefore !== void 0, () => (input[_cB].toISOString().split(".")[0] + "Z").toString()],
211
+ [_cA]: [() => input.createdAfter !== void 0, () => (input[_cA].toISOString().split(".")[0] + "Z").toString()],
212
+ [_t]: [() => input.types !== void 0, () => (input[_t] || []).map((_entry) => _entry)],
213
+ [_s]: [() => input.states !== void 0, () => (input[_s] || []).map((_entry) => _entry)],
214
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
215
+ [_nT]: [, input[_nT]],
342
216
  });
343
217
  let body;
344
- return new protocol_http_1.HttpRequest({
345
- protocol,
346
- hostname,
347
- port,
348
- method: "GET",
349
- headers,
350
- path: resolvedPath,
351
- query,
352
- body,
353
- });
218
+ b.m("GET").h(headers).q(query).b(body);
219
+ return b.build();
354
220
  };
355
221
  exports.se_ListManagedEndpointsCommand = se_ListManagedEndpointsCommand;
356
222
  const se_ListTagsForResourceCommand = async (input, context) => {
357
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
223
+ const b = (0, core_2.requestBuilder)(input, context);
358
224
  const headers = {};
359
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
360
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
225
+ b.bp("/tags/{resourceArn}");
226
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
361
227
  let body;
362
- return new protocol_http_1.HttpRequest({
363
- protocol,
364
- hostname,
365
- port,
366
- method: "GET",
367
- headers,
368
- path: resolvedPath,
369
- body,
370
- });
228
+ b.m("GET").h(headers).b(body);
229
+ return b.build();
371
230
  };
372
231
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
373
232
  const se_ListVirtualClustersCommand = async (input, context) => {
374
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
233
+ const b = (0, core_2.requestBuilder)(input, context);
375
234
  const headers = {};
376
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/virtualclusters";
235
+ b.bp("/virtualclusters");
377
236
  const query = (0, smithy_client_1.map)({
378
- containerProviderId: [, input.containerProviderId],
379
- containerProviderType: [, input.containerProviderType],
380
- createdAfter: [
381
- () => input.createdAfter !== void 0,
382
- () => (input.createdAfter.toISOString().split(".")[0] + "Z").toString(),
383
- ],
384
- createdBefore: [
385
- () => input.createdBefore !== void 0,
386
- () => (input.createdBefore.toISOString().split(".")[0] + "Z").toString(),
387
- ],
388
- states: [() => input.states !== void 0, () => (input.states || []).map((_entry) => _entry)],
389
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
390
- nextToken: [, input.nextToken],
237
+ [_cPI]: [, input[_cPI]],
238
+ [_cPT]: [, input[_cPT]],
239
+ [_cA]: [() => input.createdAfter !== void 0, () => (input[_cA].toISOString().split(".")[0] + "Z").toString()],
240
+ [_cB]: [() => input.createdBefore !== void 0, () => (input[_cB].toISOString().split(".")[0] + "Z").toString()],
241
+ [_s]: [() => input.states !== void 0, () => (input[_s] || []).map((_entry) => _entry)],
242
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
243
+ [_nT]: [, input[_nT]],
391
244
  });
392
245
  let body;
393
- return new protocol_http_1.HttpRequest({
394
- protocol,
395
- hostname,
396
- port,
397
- method: "GET",
398
- headers,
399
- path: resolvedPath,
400
- query,
401
- body,
402
- });
246
+ b.m("GET").h(headers).q(query).b(body);
247
+ return b.build();
403
248
  };
404
249
  exports.se_ListVirtualClustersCommand = se_ListVirtualClustersCommand;
405
250
  const se_StartJobRunCommand = async (input, context) => {
406
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
251
+ const b = (0, core_2.requestBuilder)(input, context);
407
252
  const headers = {
408
253
  "content-type": "application/json",
409
254
  };
410
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
411
- "/virtualclusters/{virtualClusterId}/jobruns";
412
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
255
+ b.bp("/virtualclusters/{virtualClusterId}/jobruns");
256
+ b.p("virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
413
257
  let body;
414
258
  body = JSON.stringify((0, smithy_client_1.take)(input, {
415
259
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -423,61 +267,39 @@ const se_StartJobRunCommand = async (input, context) => {
423
267
  retryPolicyConfiguration: (_) => (0, smithy_client_1._json)(_),
424
268
  tags: (_) => (0, smithy_client_1._json)(_),
425
269
  }));
426
- return new protocol_http_1.HttpRequest({
427
- protocol,
428
- hostname,
429
- port,
430
- method: "POST",
431
- headers,
432
- path: resolvedPath,
433
- body,
434
- });
270
+ b.m("POST").h(headers).b(body);
271
+ return b.build();
435
272
  };
436
273
  exports.se_StartJobRunCommand = se_StartJobRunCommand;
437
274
  const se_TagResourceCommand = async (input, context) => {
438
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
275
+ const b = (0, core_2.requestBuilder)(input, context);
439
276
  const headers = {
440
277
  "content-type": "application/json",
441
278
  };
442
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
443
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
279
+ b.bp("/tags/{resourceArn}");
280
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
444
281
  let body;
445
282
  body = JSON.stringify((0, smithy_client_1.take)(input, {
446
283
  tags: (_) => (0, smithy_client_1._json)(_),
447
284
  }));
448
- return new protocol_http_1.HttpRequest({
449
- protocol,
450
- hostname,
451
- port,
452
- method: "POST",
453
- headers,
454
- path: resolvedPath,
455
- body,
456
- });
285
+ b.m("POST").h(headers).b(body);
286
+ return b.build();
457
287
  };
458
288
  exports.se_TagResourceCommand = se_TagResourceCommand;
459
289
  const se_UntagResourceCommand = async (input, context) => {
460
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
290
+ const b = (0, core_2.requestBuilder)(input, context);
461
291
  const headers = {};
462
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
463
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
292
+ b.bp("/tags/{resourceArn}");
293
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
464
294
  const query = (0, smithy_client_1.map)({
465
- tagKeys: [
295
+ [_tK]: [
466
296
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
467
- () => (input.tagKeys || []).map((_entry) => _entry),
297
+ () => (input[_tK] || []).map((_entry) => _entry),
468
298
  ],
469
299
  });
470
300
  let body;
471
- return new protocol_http_1.HttpRequest({
472
- protocol,
473
- hostname,
474
- port,
475
- method: "DELETE",
476
- headers,
477
- path: resolvedPath,
478
- query,
479
- body,
480
- });
301
+ b.m("DELETE").h(headers).q(query).b(body);
302
+ return b.build();
481
303
  };
482
304
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
483
305
  const de_CancelJobRunCommand = async (output, context) => {
@@ -1508,6 +1330,16 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1508
1330
  value !== "" &&
1509
1331
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1510
1332
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1333
+ const _cA = "createdAfter";
1334
+ const _cB = "createdBefore";
1335
+ const _cPI = "containerProviderId";
1336
+ const _cPT = "containerProviderType";
1337
+ const _mR = "maxResults";
1338
+ const _n = "name";
1339
+ const _nT = "nextToken";
1340
+ const _s = "states";
1341
+ const _t = "types";
1342
+ const _tK = "tagKeys";
1511
1343
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1512
1344
  if (encoded.length) {
1513
1345
  return JSON.parse(encoded);
@@ -1,33 +1,25 @@
1
1
  import { awsExpectUnion as __expectUnion } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
2
+ import { requestBuilder as rb } from "@smithy/core";
3
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@smithy/smithy-client";
4
4
  import { v4 as generateIdempotencyToken } from "uuid";
5
5
  import { EMRContainersServiceException as __BaseException } from "../models/EMRContainersServiceException";
6
6
  import { InternalServerException, RequestThrottledException, ResourceNotFoundException, ValidationException, } from "../models/models_0";
7
7
  export const se_CancelJobRunCommand = async (input, context) => {
8
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
8
+ const b = rb(input, context);
9
9
  const headers = {};
10
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
11
- "/virtualclusters/{virtualClusterId}/jobruns/{id}";
12
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
13
- resolvedPath = __resolvedPath(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
10
+ b.bp("/virtualclusters/{virtualClusterId}/jobruns/{id}");
11
+ b.p("id", () => input.id, "{id}", false);
12
+ b.p("virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
14
13
  let body;
15
- return new __HttpRequest({
16
- protocol,
17
- hostname,
18
- port,
19
- method: "DELETE",
20
- headers,
21
- path: resolvedPath,
22
- body,
23
- });
14
+ b.m("DELETE").h(headers).b(body);
15
+ return b.build();
24
16
  };
25
17
  export const se_CreateJobTemplateCommand = async (input, context) => {
26
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
18
+ const b = rb(input, context);
27
19
  const headers = {
28
20
  "content-type": "application/json",
29
21
  };
30
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobtemplates";
22
+ b.bp("/jobtemplates");
31
23
  let body;
32
24
  body = JSON.stringify(take(input, {
33
25
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -36,24 +28,16 @@ export const se_CreateJobTemplateCommand = async (input, context) => {
36
28
  name: [],
37
29
  tags: (_) => _json(_),
38
30
  }));
39
- return new __HttpRequest({
40
- protocol,
41
- hostname,
42
- port,
43
- method: "POST",
44
- headers,
45
- path: resolvedPath,
46
- body,
47
- });
31
+ b.m("POST").h(headers).b(body);
32
+ return b.build();
48
33
  };
49
34
  export const se_CreateManagedEndpointCommand = async (input, context) => {
50
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
35
+ const b = rb(input, context);
51
36
  const headers = {
52
37
  "content-type": "application/json",
53
38
  };
54
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
55
- "/virtualclusters/{virtualClusterId}/endpoints";
56
- resolvedPath = __resolvedPath(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
39
+ b.bp("/virtualclusters/{virtualClusterId}/endpoints");
40
+ b.p("virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
57
41
  let body;
58
42
  body = JSON.stringify(take(input, {
59
43
  certificateArn: [],
@@ -65,22 +49,15 @@ export const se_CreateManagedEndpointCommand = async (input, context) => {
65
49
  tags: (_) => _json(_),
66
50
  type: [],
67
51
  }));
68
- return new __HttpRequest({
69
- protocol,
70
- hostname,
71
- port,
72
- method: "POST",
73
- headers,
74
- path: resolvedPath,
75
- body,
76
- });
52
+ b.m("POST").h(headers).b(body);
53
+ return b.build();
77
54
  };
78
55
  export const se_CreateVirtualClusterCommand = async (input, context) => {
79
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
56
+ const b = rb(input, context);
80
57
  const headers = {
81
58
  "content-type": "application/json",
82
59
  };
83
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/virtualclusters";
60
+ b.bp("/virtualclusters");
84
61
  let body;
85
62
  body = JSON.stringify(take(input, {
86
63
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -88,143 +65,83 @@ export const se_CreateVirtualClusterCommand = async (input, context) => {
88
65
  name: [],
89
66
  tags: (_) => _json(_),
90
67
  }));
91
- return new __HttpRequest({
92
- protocol,
93
- hostname,
94
- port,
95
- method: "POST",
96
- headers,
97
- path: resolvedPath,
98
- body,
99
- });
68
+ b.m("POST").h(headers).b(body);
69
+ return b.build();
100
70
  };
101
71
  export const se_DeleteJobTemplateCommand = async (input, context) => {
102
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
72
+ const b = rb(input, context);
103
73
  const headers = {};
104
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobtemplates/{id}";
105
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
74
+ b.bp("/jobtemplates/{id}");
75
+ b.p("id", () => input.id, "{id}", false);
106
76
  let body;
107
- return new __HttpRequest({
108
- protocol,
109
- hostname,
110
- port,
111
- method: "DELETE",
112
- headers,
113
- path: resolvedPath,
114
- body,
115
- });
77
+ b.m("DELETE").h(headers).b(body);
78
+ return b.build();
116
79
  };
117
80
  export const se_DeleteManagedEndpointCommand = async (input, context) => {
118
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
81
+ const b = rb(input, context);
119
82
  const headers = {};
120
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
121
- "/virtualclusters/{virtualClusterId}/endpoints/{id}";
122
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
123
- resolvedPath = __resolvedPath(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
83
+ b.bp("/virtualclusters/{virtualClusterId}/endpoints/{id}");
84
+ b.p("id", () => input.id, "{id}", false);
85
+ b.p("virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
124
86
  let body;
125
- return new __HttpRequest({
126
- protocol,
127
- hostname,
128
- port,
129
- method: "DELETE",
130
- headers,
131
- path: resolvedPath,
132
- body,
133
- });
87
+ b.m("DELETE").h(headers).b(body);
88
+ return b.build();
134
89
  };
135
90
  export const se_DeleteVirtualClusterCommand = async (input, context) => {
136
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
91
+ const b = rb(input, context);
137
92
  const headers = {};
138
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/virtualclusters/{id}";
139
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
93
+ b.bp("/virtualclusters/{id}");
94
+ b.p("id", () => input.id, "{id}", false);
140
95
  let body;
141
- return new __HttpRequest({
142
- protocol,
143
- hostname,
144
- port,
145
- method: "DELETE",
146
- headers,
147
- path: resolvedPath,
148
- body,
149
- });
96
+ b.m("DELETE").h(headers).b(body);
97
+ return b.build();
150
98
  };
151
99
  export const se_DescribeJobRunCommand = async (input, context) => {
152
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
100
+ const b = rb(input, context);
153
101
  const headers = {};
154
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
155
- "/virtualclusters/{virtualClusterId}/jobruns/{id}";
156
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
157
- resolvedPath = __resolvedPath(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
102
+ b.bp("/virtualclusters/{virtualClusterId}/jobruns/{id}");
103
+ b.p("id", () => input.id, "{id}", false);
104
+ b.p("virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
158
105
  let body;
159
- return new __HttpRequest({
160
- protocol,
161
- hostname,
162
- port,
163
- method: "GET",
164
- headers,
165
- path: resolvedPath,
166
- body,
167
- });
106
+ b.m("GET").h(headers).b(body);
107
+ return b.build();
168
108
  };
169
109
  export const se_DescribeJobTemplateCommand = async (input, context) => {
170
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
110
+ const b = rb(input, context);
171
111
  const headers = {};
172
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobtemplates/{id}";
173
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
112
+ b.bp("/jobtemplates/{id}");
113
+ b.p("id", () => input.id, "{id}", false);
174
114
  let body;
175
- return new __HttpRequest({
176
- protocol,
177
- hostname,
178
- port,
179
- method: "GET",
180
- headers,
181
- path: resolvedPath,
182
- body,
183
- });
115
+ b.m("GET").h(headers).b(body);
116
+ return b.build();
184
117
  };
185
118
  export const se_DescribeManagedEndpointCommand = async (input, context) => {
186
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
119
+ const b = rb(input, context);
187
120
  const headers = {};
188
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
189
- "/virtualclusters/{virtualClusterId}/endpoints/{id}";
190
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
191
- resolvedPath = __resolvedPath(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
121
+ b.bp("/virtualclusters/{virtualClusterId}/endpoints/{id}");
122
+ b.p("id", () => input.id, "{id}", false);
123
+ b.p("virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
192
124
  let body;
193
- return new __HttpRequest({
194
- protocol,
195
- hostname,
196
- port,
197
- method: "GET",
198
- headers,
199
- path: resolvedPath,
200
- body,
201
- });
125
+ b.m("GET").h(headers).b(body);
126
+ return b.build();
202
127
  };
203
128
  export const se_DescribeVirtualClusterCommand = async (input, context) => {
204
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
129
+ const b = rb(input, context);
205
130
  const headers = {};
206
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/virtualclusters/{id}";
207
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
131
+ b.bp("/virtualclusters/{id}");
132
+ b.p("id", () => input.id, "{id}", false);
208
133
  let body;
209
- return new __HttpRequest({
210
- protocol,
211
- hostname,
212
- port,
213
- method: "GET",
214
- headers,
215
- path: resolvedPath,
216
- body,
217
- });
134
+ b.m("GET").h(headers).b(body);
135
+ return b.build();
218
136
  };
219
137
  export const se_GetManagedEndpointSessionCredentialsCommand = async (input, context) => {
220
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
138
+ const b = rb(input, context);
221
139
  const headers = {
222
140
  "content-type": "application/json",
223
141
  };
224
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
225
- "/virtualclusters/{virtualClusterIdentifier}/endpoints/{endpointIdentifier}/credentials";
226
- resolvedPath = __resolvedPath(resolvedPath, input, "endpointIdentifier", () => input.endpointIdentifier, "{endpointIdentifier}", false);
227
- resolvedPath = __resolvedPath(resolvedPath, input, "virtualClusterIdentifier", () => input.virtualClusterIdentifier, "{virtualClusterIdentifier}", false);
142
+ b.bp("/virtualclusters/{virtualClusterIdentifier}/endpoints/{endpointIdentifier}/credentials");
143
+ b.p("endpointIdentifier", () => input.endpointIdentifier, "{endpointIdentifier}", false);
144
+ b.p("virtualClusterIdentifier", () => input.virtualClusterIdentifier, "{virtualClusterIdentifier}", false);
228
145
  let body;
229
146
  body = JSON.stringify(take(input, {
230
147
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -233,163 +150,90 @@ export const se_GetManagedEndpointSessionCredentialsCommand = async (input, cont
233
150
  executionRoleArn: [],
234
151
  logContext: [],
235
152
  }));
236
- return new __HttpRequest({
237
- protocol,
238
- hostname,
239
- port,
240
- method: "POST",
241
- headers,
242
- path: resolvedPath,
243
- body,
244
- });
153
+ b.m("POST").h(headers).b(body);
154
+ return b.build();
245
155
  };
246
156
  export const se_ListJobRunsCommand = async (input, context) => {
247
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
157
+ const b = rb(input, context);
248
158
  const headers = {};
249
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
250
- "/virtualclusters/{virtualClusterId}/jobruns";
251
- resolvedPath = __resolvedPath(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
159
+ b.bp("/virtualclusters/{virtualClusterId}/jobruns");
160
+ b.p("virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
252
161
  const query = map({
253
- createdBefore: [
254
- () => input.createdBefore !== void 0,
255
- () => (input.createdBefore.toISOString().split(".")[0] + "Z").toString(),
256
- ],
257
- createdAfter: [
258
- () => input.createdAfter !== void 0,
259
- () => (input.createdAfter.toISOString().split(".")[0] + "Z").toString(),
260
- ],
261
- name: [, input.name],
262
- states: [() => input.states !== void 0, () => (input.states || []).map((_entry) => _entry)],
263
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
264
- nextToken: [, input.nextToken],
162
+ [_cB]: [() => input.createdBefore !== void 0, () => (input[_cB].toISOString().split(".")[0] + "Z").toString()],
163
+ [_cA]: [() => input.createdAfter !== void 0, () => (input[_cA].toISOString().split(".")[0] + "Z").toString()],
164
+ [_n]: [, input[_n]],
165
+ [_s]: [() => input.states !== void 0, () => (input[_s] || []).map((_entry) => _entry)],
166
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
167
+ [_nT]: [, input[_nT]],
265
168
  });
266
169
  let body;
267
- return new __HttpRequest({
268
- protocol,
269
- hostname,
270
- port,
271
- method: "GET",
272
- headers,
273
- path: resolvedPath,
274
- query,
275
- body,
276
- });
170
+ b.m("GET").h(headers).q(query).b(body);
171
+ return b.build();
277
172
  };
278
173
  export const se_ListJobTemplatesCommand = async (input, context) => {
279
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
174
+ const b = rb(input, context);
280
175
  const headers = {};
281
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobtemplates";
176
+ b.bp("/jobtemplates");
282
177
  const query = map({
283
- createdAfter: [
284
- () => input.createdAfter !== void 0,
285
- () => (input.createdAfter.toISOString().split(".")[0] + "Z").toString(),
286
- ],
287
- createdBefore: [
288
- () => input.createdBefore !== void 0,
289
- () => (input.createdBefore.toISOString().split(".")[0] + "Z").toString(),
290
- ],
291
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
292
- nextToken: [, input.nextToken],
178
+ [_cA]: [() => input.createdAfter !== void 0, () => (input[_cA].toISOString().split(".")[0] + "Z").toString()],
179
+ [_cB]: [() => input.createdBefore !== void 0, () => (input[_cB].toISOString().split(".")[0] + "Z").toString()],
180
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
181
+ [_nT]: [, input[_nT]],
293
182
  });
294
183
  let body;
295
- return new __HttpRequest({
296
- protocol,
297
- hostname,
298
- port,
299
- method: "GET",
300
- headers,
301
- path: resolvedPath,
302
- query,
303
- body,
304
- });
184
+ b.m("GET").h(headers).q(query).b(body);
185
+ return b.build();
305
186
  };
306
187
  export const se_ListManagedEndpointsCommand = async (input, context) => {
307
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
188
+ const b = rb(input, context);
308
189
  const headers = {};
309
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
310
- "/virtualclusters/{virtualClusterId}/endpoints";
311
- resolvedPath = __resolvedPath(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
190
+ b.bp("/virtualclusters/{virtualClusterId}/endpoints");
191
+ b.p("virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
312
192
  const query = map({
313
- createdBefore: [
314
- () => input.createdBefore !== void 0,
315
- () => (input.createdBefore.toISOString().split(".")[0] + "Z").toString(),
316
- ],
317
- createdAfter: [
318
- () => input.createdAfter !== void 0,
319
- () => (input.createdAfter.toISOString().split(".")[0] + "Z").toString(),
320
- ],
321
- types: [() => input.types !== void 0, () => (input.types || []).map((_entry) => _entry)],
322
- states: [() => input.states !== void 0, () => (input.states || []).map((_entry) => _entry)],
323
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
324
- nextToken: [, input.nextToken],
193
+ [_cB]: [() => input.createdBefore !== void 0, () => (input[_cB].toISOString().split(".")[0] + "Z").toString()],
194
+ [_cA]: [() => input.createdAfter !== void 0, () => (input[_cA].toISOString().split(".")[0] + "Z").toString()],
195
+ [_t]: [() => input.types !== void 0, () => (input[_t] || []).map((_entry) => _entry)],
196
+ [_s]: [() => input.states !== void 0, () => (input[_s] || []).map((_entry) => _entry)],
197
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
198
+ [_nT]: [, input[_nT]],
325
199
  });
326
200
  let body;
327
- return new __HttpRequest({
328
- protocol,
329
- hostname,
330
- port,
331
- method: "GET",
332
- headers,
333
- path: resolvedPath,
334
- query,
335
- body,
336
- });
201
+ b.m("GET").h(headers).q(query).b(body);
202
+ return b.build();
337
203
  };
338
204
  export const se_ListTagsForResourceCommand = async (input, context) => {
339
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
205
+ const b = rb(input, context);
340
206
  const headers = {};
341
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
342
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
207
+ b.bp("/tags/{resourceArn}");
208
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
343
209
  let body;
344
- return new __HttpRequest({
345
- protocol,
346
- hostname,
347
- port,
348
- method: "GET",
349
- headers,
350
- path: resolvedPath,
351
- body,
352
- });
210
+ b.m("GET").h(headers).b(body);
211
+ return b.build();
353
212
  };
354
213
  export const se_ListVirtualClustersCommand = async (input, context) => {
355
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
214
+ const b = rb(input, context);
356
215
  const headers = {};
357
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/virtualclusters";
216
+ b.bp("/virtualclusters");
358
217
  const query = map({
359
- containerProviderId: [, input.containerProviderId],
360
- containerProviderType: [, input.containerProviderType],
361
- createdAfter: [
362
- () => input.createdAfter !== void 0,
363
- () => (input.createdAfter.toISOString().split(".")[0] + "Z").toString(),
364
- ],
365
- createdBefore: [
366
- () => input.createdBefore !== void 0,
367
- () => (input.createdBefore.toISOString().split(".")[0] + "Z").toString(),
368
- ],
369
- states: [() => input.states !== void 0, () => (input.states || []).map((_entry) => _entry)],
370
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
371
- nextToken: [, input.nextToken],
218
+ [_cPI]: [, input[_cPI]],
219
+ [_cPT]: [, input[_cPT]],
220
+ [_cA]: [() => input.createdAfter !== void 0, () => (input[_cA].toISOString().split(".")[0] + "Z").toString()],
221
+ [_cB]: [() => input.createdBefore !== void 0, () => (input[_cB].toISOString().split(".")[0] + "Z").toString()],
222
+ [_s]: [() => input.states !== void 0, () => (input[_s] || []).map((_entry) => _entry)],
223
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
224
+ [_nT]: [, input[_nT]],
372
225
  });
373
226
  let body;
374
- return new __HttpRequest({
375
- protocol,
376
- hostname,
377
- port,
378
- method: "GET",
379
- headers,
380
- path: resolvedPath,
381
- query,
382
- body,
383
- });
227
+ b.m("GET").h(headers).q(query).b(body);
228
+ return b.build();
384
229
  };
385
230
  export const se_StartJobRunCommand = async (input, context) => {
386
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
231
+ const b = rb(input, context);
387
232
  const headers = {
388
233
  "content-type": "application/json",
389
234
  };
390
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
391
- "/virtualclusters/{virtualClusterId}/jobruns";
392
- resolvedPath = __resolvedPath(resolvedPath, input, "virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
235
+ b.bp("/virtualclusters/{virtualClusterId}/jobruns");
236
+ b.p("virtualClusterId", () => input.virtualClusterId, "{virtualClusterId}", false);
393
237
  let body;
394
238
  body = JSON.stringify(take(input, {
395
239
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -403,59 +247,37 @@ export const se_StartJobRunCommand = async (input, context) => {
403
247
  retryPolicyConfiguration: (_) => _json(_),
404
248
  tags: (_) => _json(_),
405
249
  }));
406
- return new __HttpRequest({
407
- protocol,
408
- hostname,
409
- port,
410
- method: "POST",
411
- headers,
412
- path: resolvedPath,
413
- body,
414
- });
250
+ b.m("POST").h(headers).b(body);
251
+ return b.build();
415
252
  };
416
253
  export const se_TagResourceCommand = async (input, context) => {
417
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
254
+ const b = rb(input, context);
418
255
  const headers = {
419
256
  "content-type": "application/json",
420
257
  };
421
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
422
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
258
+ b.bp("/tags/{resourceArn}");
259
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
423
260
  let body;
424
261
  body = JSON.stringify(take(input, {
425
262
  tags: (_) => _json(_),
426
263
  }));
427
- return new __HttpRequest({
428
- protocol,
429
- hostname,
430
- port,
431
- method: "POST",
432
- headers,
433
- path: resolvedPath,
434
- body,
435
- });
264
+ b.m("POST").h(headers).b(body);
265
+ return b.build();
436
266
  };
437
267
  export const se_UntagResourceCommand = async (input, context) => {
438
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
268
+ const b = rb(input, context);
439
269
  const headers = {};
440
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
441
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
270
+ b.bp("/tags/{resourceArn}");
271
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
442
272
  const query = map({
443
- tagKeys: [
273
+ [_tK]: [
444
274
  __expectNonNull(input.tagKeys, `tagKeys`) != null,
445
- () => (input.tagKeys || []).map((_entry) => _entry),
275
+ () => (input[_tK] || []).map((_entry) => _entry),
446
276
  ],
447
277
  });
448
278
  let body;
449
- return new __HttpRequest({
450
- protocol,
451
- hostname,
452
- port,
453
- method: "DELETE",
454
- headers,
455
- path: resolvedPath,
456
- query,
457
- body,
458
- });
279
+ b.m("DELETE").h(headers).q(query).b(body);
280
+ return b.build();
459
281
  };
460
282
  export const de_CancelJobRunCommand = async (output, context) => {
461
283
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1465,6 +1287,16 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1465
1287
  value !== "" &&
1466
1288
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1467
1289
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1290
+ const _cA = "createdAfter";
1291
+ const _cB = "createdBefore";
1292
+ const _cPI = "containerProviderId";
1293
+ const _cPT = "containerProviderType";
1294
+ const _mR = "maxResults";
1295
+ const _n = "name";
1296
+ const _nT = "nextToken";
1297
+ const _s = "states";
1298
+ const _t = "types";
1299
+ const _tK = "tagKeys";
1468
1300
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1469
1301
  if (encoded.length) {
1470
1302
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-emr-containers",
3
3
  "description": "AWS SDK for JavaScript Emr Containers Client for Node.js, Browser and React Native",
4
- "version": "3.476.0",
4
+ "version": "3.477.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,9 +20,9 @@
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.477.0",
24
+ "@aws-sdk/core": "3.477.0",
25
+ "@aws-sdk/credential-provider-node": "3.477.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",
@@ -34,6 +34,7 @@
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",