@aws-sdk/client-controltower 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.
@@ -1,82 +1,61 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateLandingZoneCommand = exports.de_UpdateEnabledControlCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ResetLandingZoneCommand = exports.de_ListTagsForResourceCommand = exports.de_ListLandingZonesCommand = exports.de_ListEnabledControlsCommand = exports.de_GetLandingZoneOperationCommand = exports.de_GetLandingZoneCommand = exports.de_GetEnabledControlCommand = exports.de_GetControlOperationCommand = exports.de_EnableControlCommand = exports.de_DisableControlCommand = exports.de_DeleteLandingZoneCommand = exports.de_CreateLandingZoneCommand = exports.se_UpdateLandingZoneCommand = exports.se_UpdateEnabledControlCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ResetLandingZoneCommand = exports.se_ListTagsForResourceCommand = exports.se_ListLandingZonesCommand = exports.se_ListEnabledControlsCommand = exports.se_GetLandingZoneOperationCommand = exports.se_GetLandingZoneCommand = exports.se_GetEnabledControlCommand = exports.se_GetControlOperationCommand = exports.se_EnableControlCommand = exports.se_DisableControlCommand = exports.se_DeleteLandingZoneCommand = exports.se_CreateLandingZoneCommand = void 0;
4
- const protocol_http_1 = require("@smithy/protocol-http");
4
+ const core_1 = require("@smithy/core");
5
5
  const smithy_client_1 = require("@smithy/smithy-client");
6
6
  const ControlTowerServiceException_1 = require("../models/ControlTowerServiceException");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const se_CreateLandingZoneCommand = async (input, context) => {
9
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
+ const b = (0, core_1.requestBuilder)(input, context);
10
10
  const headers = {
11
11
  "content-type": "application/json",
12
12
  };
13
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/create-landingzone";
13
+ b.bp("/create-landingzone");
14
14
  let body;
15
15
  body = JSON.stringify((0, smithy_client_1.take)(input, {
16
16
  manifest: (_) => se_Manifest(_, context),
17
17
  tags: (_) => (0, smithy_client_1._json)(_),
18
18
  version: [],
19
19
  }));
20
- return new protocol_http_1.HttpRequest({
21
- protocol,
22
- hostname,
23
- port,
24
- method: "POST",
25
- headers,
26
- path: resolvedPath,
27
- body,
28
- });
20
+ b.m("POST").h(headers).b(body);
21
+ return b.build();
29
22
  };
30
23
  exports.se_CreateLandingZoneCommand = se_CreateLandingZoneCommand;
31
24
  const se_DeleteLandingZoneCommand = async (input, context) => {
32
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
25
+ const b = (0, core_1.requestBuilder)(input, context);
33
26
  const headers = {
34
27
  "content-type": "application/json",
35
28
  };
36
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-landingzone";
29
+ b.bp("/delete-landingzone");
37
30
  let body;
38
31
  body = JSON.stringify((0, smithy_client_1.take)(input, {
39
32
  landingZoneIdentifier: [],
40
33
  }));
41
- return new protocol_http_1.HttpRequest({
42
- protocol,
43
- hostname,
44
- port,
45
- method: "POST",
46
- headers,
47
- path: resolvedPath,
48
- body,
49
- });
34
+ b.m("POST").h(headers).b(body);
35
+ return b.build();
50
36
  };
51
37
  exports.se_DeleteLandingZoneCommand = se_DeleteLandingZoneCommand;
52
38
  const se_DisableControlCommand = async (input, context) => {
53
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
39
+ const b = (0, core_1.requestBuilder)(input, context);
54
40
  const headers = {
55
41
  "content-type": "application/json",
56
42
  };
57
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disable-control";
43
+ b.bp("/disable-control");
58
44
  let body;
59
45
  body = JSON.stringify((0, smithy_client_1.take)(input, {
60
46
  controlIdentifier: [],
61
47
  targetIdentifier: [],
62
48
  }));
63
- return new protocol_http_1.HttpRequest({
64
- protocol,
65
- hostname,
66
- port,
67
- method: "POST",
68
- headers,
69
- path: resolvedPath,
70
- body,
71
- });
49
+ b.m("POST").h(headers).b(body);
50
+ return b.build();
72
51
  };
73
52
  exports.se_DisableControlCommand = se_DisableControlCommand;
74
53
  const se_EnableControlCommand = async (input, context) => {
75
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
54
+ const b = (0, core_1.requestBuilder)(input, context);
76
55
  const headers = {
77
56
  "content-type": "application/json",
78
57
  };
79
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/enable-control";
58
+ b.bp("/enable-control");
80
59
  let body;
81
60
  body = JSON.stringify((0, smithy_client_1.take)(input, {
82
61
  controlIdentifier: [],
@@ -84,273 +63,181 @@ const se_EnableControlCommand = async (input, context) => {
84
63
  tags: (_) => (0, smithy_client_1._json)(_),
85
64
  targetIdentifier: [],
86
65
  }));
87
- return new protocol_http_1.HttpRequest({
88
- protocol,
89
- hostname,
90
- port,
91
- method: "POST",
92
- headers,
93
- path: resolvedPath,
94
- body,
95
- });
66
+ b.m("POST").h(headers).b(body);
67
+ return b.build();
96
68
  };
97
69
  exports.se_EnableControlCommand = se_EnableControlCommand;
98
70
  const se_GetControlOperationCommand = async (input, context) => {
99
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
71
+ const b = (0, core_1.requestBuilder)(input, context);
100
72
  const headers = {
101
73
  "content-type": "application/json",
102
74
  };
103
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-control-operation";
75
+ b.bp("/get-control-operation");
104
76
  let body;
105
77
  body = JSON.stringify((0, smithy_client_1.take)(input, {
106
78
  operationIdentifier: [],
107
79
  }));
108
- return new protocol_http_1.HttpRequest({
109
- protocol,
110
- hostname,
111
- port,
112
- method: "POST",
113
- headers,
114
- path: resolvedPath,
115
- body,
116
- });
80
+ b.m("POST").h(headers).b(body);
81
+ return b.build();
117
82
  };
118
83
  exports.se_GetControlOperationCommand = se_GetControlOperationCommand;
119
84
  const se_GetEnabledControlCommand = async (input, context) => {
120
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
85
+ const b = (0, core_1.requestBuilder)(input, context);
121
86
  const headers = {
122
87
  "content-type": "application/json",
123
88
  };
124
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-enabled-control";
89
+ b.bp("/get-enabled-control");
125
90
  let body;
126
91
  body = JSON.stringify((0, smithy_client_1.take)(input, {
127
92
  enabledControlIdentifier: [],
128
93
  }));
129
- return new protocol_http_1.HttpRequest({
130
- protocol,
131
- hostname,
132
- port,
133
- method: "POST",
134
- headers,
135
- path: resolvedPath,
136
- body,
137
- });
94
+ b.m("POST").h(headers).b(body);
95
+ return b.build();
138
96
  };
139
97
  exports.se_GetEnabledControlCommand = se_GetEnabledControlCommand;
140
98
  const se_GetLandingZoneCommand = async (input, context) => {
141
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
99
+ const b = (0, core_1.requestBuilder)(input, context);
142
100
  const headers = {
143
101
  "content-type": "application/json",
144
102
  };
145
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-landingzone";
103
+ b.bp("/get-landingzone");
146
104
  let body;
147
105
  body = JSON.stringify((0, smithy_client_1.take)(input, {
148
106
  landingZoneIdentifier: [],
149
107
  }));
150
- return new protocol_http_1.HttpRequest({
151
- protocol,
152
- hostname,
153
- port,
154
- method: "POST",
155
- headers,
156
- path: resolvedPath,
157
- body,
158
- });
108
+ b.m("POST").h(headers).b(body);
109
+ return b.build();
159
110
  };
160
111
  exports.se_GetLandingZoneCommand = se_GetLandingZoneCommand;
161
112
  const se_GetLandingZoneOperationCommand = async (input, context) => {
162
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
113
+ const b = (0, core_1.requestBuilder)(input, context);
163
114
  const headers = {
164
115
  "content-type": "application/json",
165
116
  };
166
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-landingzone-operation";
117
+ b.bp("/get-landingzone-operation");
167
118
  let body;
168
119
  body = JSON.stringify((0, smithy_client_1.take)(input, {
169
120
  operationIdentifier: [],
170
121
  }));
171
- return new protocol_http_1.HttpRequest({
172
- protocol,
173
- hostname,
174
- port,
175
- method: "POST",
176
- headers,
177
- path: resolvedPath,
178
- body,
179
- });
122
+ b.m("POST").h(headers).b(body);
123
+ return b.build();
180
124
  };
181
125
  exports.se_GetLandingZoneOperationCommand = se_GetLandingZoneOperationCommand;
182
126
  const se_ListEnabledControlsCommand = async (input, context) => {
183
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
127
+ const b = (0, core_1.requestBuilder)(input, context);
184
128
  const headers = {
185
129
  "content-type": "application/json",
186
130
  };
187
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-enabled-controls";
131
+ b.bp("/list-enabled-controls");
188
132
  let body;
189
133
  body = JSON.stringify((0, smithy_client_1.take)(input, {
190
134
  maxResults: [],
191
135
  nextToken: [],
192
136
  targetIdentifier: [],
193
137
  }));
194
- return new protocol_http_1.HttpRequest({
195
- protocol,
196
- hostname,
197
- port,
198
- method: "POST",
199
- headers,
200
- path: resolvedPath,
201
- body,
202
- });
138
+ b.m("POST").h(headers).b(body);
139
+ return b.build();
203
140
  };
204
141
  exports.se_ListEnabledControlsCommand = se_ListEnabledControlsCommand;
205
142
  const se_ListLandingZonesCommand = async (input, context) => {
206
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
143
+ const b = (0, core_1.requestBuilder)(input, context);
207
144
  const headers = {
208
145
  "content-type": "application/json",
209
146
  };
210
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-landingzones";
147
+ b.bp("/list-landingzones");
211
148
  let body;
212
149
  body = JSON.stringify((0, smithy_client_1.take)(input, {
213
150
  maxResults: [],
214
151
  nextToken: [],
215
152
  }));
216
- return new protocol_http_1.HttpRequest({
217
- protocol,
218
- hostname,
219
- port,
220
- method: "POST",
221
- headers,
222
- path: resolvedPath,
223
- body,
224
- });
153
+ b.m("POST").h(headers).b(body);
154
+ return b.build();
225
155
  };
226
156
  exports.se_ListLandingZonesCommand = se_ListLandingZonesCommand;
227
157
  const se_ListTagsForResourceCommand = async (input, context) => {
228
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
158
+ const b = (0, core_1.requestBuilder)(input, context);
229
159
  const headers = {};
230
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
231
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
160
+ b.bp("/tags/{resourceArn}");
161
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
232
162
  let body;
233
- return new protocol_http_1.HttpRequest({
234
- protocol,
235
- hostname,
236
- port,
237
- method: "GET",
238
- headers,
239
- path: resolvedPath,
240
- body,
241
- });
163
+ b.m("GET").h(headers).b(body);
164
+ return b.build();
242
165
  };
243
166
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
244
167
  const se_ResetLandingZoneCommand = async (input, context) => {
245
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
168
+ const b = (0, core_1.requestBuilder)(input, context);
246
169
  const headers = {
247
170
  "content-type": "application/json",
248
171
  };
249
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reset-landingzone";
172
+ b.bp("/reset-landingzone");
250
173
  let body;
251
174
  body = JSON.stringify((0, smithy_client_1.take)(input, {
252
175
  landingZoneIdentifier: [],
253
176
  }));
254
- return new protocol_http_1.HttpRequest({
255
- protocol,
256
- hostname,
257
- port,
258
- method: "POST",
259
- headers,
260
- path: resolvedPath,
261
- body,
262
- });
177
+ b.m("POST").h(headers).b(body);
178
+ return b.build();
263
179
  };
264
180
  exports.se_ResetLandingZoneCommand = se_ResetLandingZoneCommand;
265
181
  const se_TagResourceCommand = async (input, context) => {
266
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
182
+ const b = (0, core_1.requestBuilder)(input, context);
267
183
  const headers = {
268
184
  "content-type": "application/json",
269
185
  };
270
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
271
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
186
+ b.bp("/tags/{resourceArn}");
187
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
272
188
  let body;
273
189
  body = JSON.stringify((0, smithy_client_1.take)(input, {
274
190
  tags: (_) => (0, smithy_client_1._json)(_),
275
191
  }));
276
- return new protocol_http_1.HttpRequest({
277
- protocol,
278
- hostname,
279
- port,
280
- method: "POST",
281
- headers,
282
- path: resolvedPath,
283
- body,
284
- });
192
+ b.m("POST").h(headers).b(body);
193
+ return b.build();
285
194
  };
286
195
  exports.se_TagResourceCommand = se_TagResourceCommand;
287
196
  const se_UntagResourceCommand = async (input, context) => {
288
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
197
+ const b = (0, core_1.requestBuilder)(input, context);
289
198
  const headers = {};
290
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
291
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
199
+ b.bp("/tags/{resourceArn}");
200
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
292
201
  const query = (0, smithy_client_1.map)({
293
- tagKeys: [
202
+ [_tK]: [
294
203
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
295
- () => (input.tagKeys || []).map((_entry) => _entry),
204
+ () => (input[_tK] || []).map((_entry) => _entry),
296
205
  ],
297
206
  });
298
207
  let body;
299
- return new protocol_http_1.HttpRequest({
300
- protocol,
301
- hostname,
302
- port,
303
- method: "DELETE",
304
- headers,
305
- path: resolvedPath,
306
- query,
307
- body,
308
- });
208
+ b.m("DELETE").h(headers).q(query).b(body);
209
+ return b.build();
309
210
  };
310
211
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
311
212
  const se_UpdateEnabledControlCommand = async (input, context) => {
312
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
213
+ const b = (0, core_1.requestBuilder)(input, context);
313
214
  const headers = {
314
215
  "content-type": "application/json",
315
216
  };
316
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-enabled-control";
217
+ b.bp("/update-enabled-control");
317
218
  let body;
318
219
  body = JSON.stringify((0, smithy_client_1.take)(input, {
319
220
  enabledControlIdentifier: [],
320
221
  parameters: (_) => se_EnabledControlParameters(_, context),
321
222
  }));
322
- return new protocol_http_1.HttpRequest({
323
- protocol,
324
- hostname,
325
- port,
326
- method: "POST",
327
- headers,
328
- path: resolvedPath,
329
- body,
330
- });
223
+ b.m("POST").h(headers).b(body);
224
+ return b.build();
331
225
  };
332
226
  exports.se_UpdateEnabledControlCommand = se_UpdateEnabledControlCommand;
333
227
  const se_UpdateLandingZoneCommand = async (input, context) => {
334
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
228
+ const b = (0, core_1.requestBuilder)(input, context);
335
229
  const headers = {
336
230
  "content-type": "application/json",
337
231
  };
338
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-landingzone";
232
+ b.bp("/update-landingzone");
339
233
  let body;
340
234
  body = JSON.stringify((0, smithy_client_1.take)(input, {
341
235
  landingZoneIdentifier: [],
342
236
  manifest: (_) => se_Manifest(_, context),
343
237
  version: [],
344
238
  }));
345
- return new protocol_http_1.HttpRequest({
346
- protocol,
347
- hostname,
348
- port,
349
- method: "POST",
350
- headers,
351
- path: resolvedPath,
352
- body,
353
- });
239
+ b.m("POST").h(headers).b(body);
240
+ return b.build();
354
241
  };
355
242
  exports.se_UpdateLandingZoneCommand = se_UpdateLandingZoneCommand;
356
243
  const de_CreateLandingZoneCommand = async (output, context) => {
@@ -1159,10 +1046,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1159
1046
  };
1160
1047
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1161
1048
  const contents = (0, smithy_client_1.map)({
1162
- retryAfterSeconds: [
1163
- () => void 0 !== parsedOutput.headers["retry-after"],
1164
- () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
1165
- ],
1049
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
1166
1050
  });
1167
1051
  const data = parsedOutput.body;
1168
1052
  const doc = (0, smithy_client_1.take)(data, {
@@ -1280,6 +1164,9 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1280
1164
  value !== "" &&
1281
1165
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1282
1166
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1167
+ const _rAS = "retryAfterSeconds";
1168
+ const _ra = "retry-after";
1169
+ const _tK = "tagKeys";
1283
1170
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1284
1171
  if (encoded.length) {
1285
1172
  return JSON.parse(encoded);
@@ -1,76 +1,55 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { ControlTowerServiceException as __BaseException } from "../models/ControlTowerServiceException";
4
4
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
5
5
  export const se_CreateLandingZoneCommand = async (input, context) => {
6
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
6
+ const b = rb(input, context);
7
7
  const headers = {
8
8
  "content-type": "application/json",
9
9
  };
10
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/create-landingzone";
10
+ b.bp("/create-landingzone");
11
11
  let body;
12
12
  body = JSON.stringify(take(input, {
13
13
  manifest: (_) => se_Manifest(_, context),
14
14
  tags: (_) => _json(_),
15
15
  version: [],
16
16
  }));
17
- return new __HttpRequest({
18
- protocol,
19
- hostname,
20
- port,
21
- method: "POST",
22
- headers,
23
- path: resolvedPath,
24
- body,
25
- });
17
+ b.m("POST").h(headers).b(body);
18
+ return b.build();
26
19
  };
27
20
  export const se_DeleteLandingZoneCommand = async (input, context) => {
28
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
21
+ const b = rb(input, context);
29
22
  const headers = {
30
23
  "content-type": "application/json",
31
24
  };
32
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-landingzone";
25
+ b.bp("/delete-landingzone");
33
26
  let body;
34
27
  body = JSON.stringify(take(input, {
35
28
  landingZoneIdentifier: [],
36
29
  }));
37
- return new __HttpRequest({
38
- protocol,
39
- hostname,
40
- port,
41
- method: "POST",
42
- headers,
43
- path: resolvedPath,
44
- body,
45
- });
30
+ b.m("POST").h(headers).b(body);
31
+ return b.build();
46
32
  };
47
33
  export const se_DisableControlCommand = async (input, context) => {
48
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
34
+ const b = rb(input, context);
49
35
  const headers = {
50
36
  "content-type": "application/json",
51
37
  };
52
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disable-control";
38
+ b.bp("/disable-control");
53
39
  let body;
54
40
  body = JSON.stringify(take(input, {
55
41
  controlIdentifier: [],
56
42
  targetIdentifier: [],
57
43
  }));
58
- return new __HttpRequest({
59
- protocol,
60
- hostname,
61
- port,
62
- method: "POST",
63
- headers,
64
- path: resolvedPath,
65
- body,
66
- });
44
+ b.m("POST").h(headers).b(body);
45
+ return b.build();
67
46
  };
68
47
  export const se_EnableControlCommand = async (input, context) => {
69
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
48
+ const b = rb(input, context);
70
49
  const headers = {
71
50
  "content-type": "application/json",
72
51
  };
73
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/enable-control";
52
+ b.bp("/enable-control");
74
53
  let body;
75
54
  body = JSON.stringify(take(input, {
76
55
  controlIdentifier: [],
@@ -78,261 +57,169 @@ export const se_EnableControlCommand = async (input, context) => {
78
57
  tags: (_) => _json(_),
79
58
  targetIdentifier: [],
80
59
  }));
81
- return new __HttpRequest({
82
- protocol,
83
- hostname,
84
- port,
85
- method: "POST",
86
- headers,
87
- path: resolvedPath,
88
- body,
89
- });
60
+ b.m("POST").h(headers).b(body);
61
+ return b.build();
90
62
  };
91
63
  export const se_GetControlOperationCommand = async (input, context) => {
92
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
64
+ const b = rb(input, context);
93
65
  const headers = {
94
66
  "content-type": "application/json",
95
67
  };
96
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-control-operation";
68
+ b.bp("/get-control-operation");
97
69
  let body;
98
70
  body = JSON.stringify(take(input, {
99
71
  operationIdentifier: [],
100
72
  }));
101
- return new __HttpRequest({
102
- protocol,
103
- hostname,
104
- port,
105
- method: "POST",
106
- headers,
107
- path: resolvedPath,
108
- body,
109
- });
73
+ b.m("POST").h(headers).b(body);
74
+ return b.build();
110
75
  };
111
76
  export const se_GetEnabledControlCommand = async (input, context) => {
112
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
77
+ const b = rb(input, context);
113
78
  const headers = {
114
79
  "content-type": "application/json",
115
80
  };
116
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-enabled-control";
81
+ b.bp("/get-enabled-control");
117
82
  let body;
118
83
  body = JSON.stringify(take(input, {
119
84
  enabledControlIdentifier: [],
120
85
  }));
121
- return new __HttpRequest({
122
- protocol,
123
- hostname,
124
- port,
125
- method: "POST",
126
- headers,
127
- path: resolvedPath,
128
- body,
129
- });
86
+ b.m("POST").h(headers).b(body);
87
+ return b.build();
130
88
  };
131
89
  export const se_GetLandingZoneCommand = async (input, context) => {
132
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
90
+ const b = rb(input, context);
133
91
  const headers = {
134
92
  "content-type": "application/json",
135
93
  };
136
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-landingzone";
94
+ b.bp("/get-landingzone");
137
95
  let body;
138
96
  body = JSON.stringify(take(input, {
139
97
  landingZoneIdentifier: [],
140
98
  }));
141
- return new __HttpRequest({
142
- protocol,
143
- hostname,
144
- port,
145
- method: "POST",
146
- headers,
147
- path: resolvedPath,
148
- body,
149
- });
99
+ b.m("POST").h(headers).b(body);
100
+ return b.build();
150
101
  };
151
102
  export const se_GetLandingZoneOperationCommand = async (input, context) => {
152
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
103
+ const b = rb(input, context);
153
104
  const headers = {
154
105
  "content-type": "application/json",
155
106
  };
156
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-landingzone-operation";
107
+ b.bp("/get-landingzone-operation");
157
108
  let body;
158
109
  body = JSON.stringify(take(input, {
159
110
  operationIdentifier: [],
160
111
  }));
161
- return new __HttpRequest({
162
- protocol,
163
- hostname,
164
- port,
165
- method: "POST",
166
- headers,
167
- path: resolvedPath,
168
- body,
169
- });
112
+ b.m("POST").h(headers).b(body);
113
+ return b.build();
170
114
  };
171
115
  export const se_ListEnabledControlsCommand = async (input, context) => {
172
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
116
+ const b = rb(input, context);
173
117
  const headers = {
174
118
  "content-type": "application/json",
175
119
  };
176
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-enabled-controls";
120
+ b.bp("/list-enabled-controls");
177
121
  let body;
178
122
  body = JSON.stringify(take(input, {
179
123
  maxResults: [],
180
124
  nextToken: [],
181
125
  targetIdentifier: [],
182
126
  }));
183
- return new __HttpRequest({
184
- protocol,
185
- hostname,
186
- port,
187
- method: "POST",
188
- headers,
189
- path: resolvedPath,
190
- body,
191
- });
127
+ b.m("POST").h(headers).b(body);
128
+ return b.build();
192
129
  };
193
130
  export const se_ListLandingZonesCommand = async (input, context) => {
194
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
131
+ const b = rb(input, context);
195
132
  const headers = {
196
133
  "content-type": "application/json",
197
134
  };
198
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-landingzones";
135
+ b.bp("/list-landingzones");
199
136
  let body;
200
137
  body = JSON.stringify(take(input, {
201
138
  maxResults: [],
202
139
  nextToken: [],
203
140
  }));
204
- return new __HttpRequest({
205
- protocol,
206
- hostname,
207
- port,
208
- method: "POST",
209
- headers,
210
- path: resolvedPath,
211
- body,
212
- });
141
+ b.m("POST").h(headers).b(body);
142
+ return b.build();
213
143
  };
214
144
  export const se_ListTagsForResourceCommand = async (input, context) => {
215
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
145
+ const b = rb(input, context);
216
146
  const headers = {};
217
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
218
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
147
+ b.bp("/tags/{resourceArn}");
148
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
219
149
  let body;
220
- return new __HttpRequest({
221
- protocol,
222
- hostname,
223
- port,
224
- method: "GET",
225
- headers,
226
- path: resolvedPath,
227
- body,
228
- });
150
+ b.m("GET").h(headers).b(body);
151
+ return b.build();
229
152
  };
230
153
  export const se_ResetLandingZoneCommand = async (input, context) => {
231
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
154
+ const b = rb(input, context);
232
155
  const headers = {
233
156
  "content-type": "application/json",
234
157
  };
235
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reset-landingzone";
158
+ b.bp("/reset-landingzone");
236
159
  let body;
237
160
  body = JSON.stringify(take(input, {
238
161
  landingZoneIdentifier: [],
239
162
  }));
240
- return new __HttpRequest({
241
- protocol,
242
- hostname,
243
- port,
244
- method: "POST",
245
- headers,
246
- path: resolvedPath,
247
- body,
248
- });
163
+ b.m("POST").h(headers).b(body);
164
+ return b.build();
249
165
  };
250
166
  export const se_TagResourceCommand = async (input, context) => {
251
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
167
+ const b = rb(input, context);
252
168
  const headers = {
253
169
  "content-type": "application/json",
254
170
  };
255
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
256
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
171
+ b.bp("/tags/{resourceArn}");
172
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
257
173
  let body;
258
174
  body = JSON.stringify(take(input, {
259
175
  tags: (_) => _json(_),
260
176
  }));
261
- return new __HttpRequest({
262
- protocol,
263
- hostname,
264
- port,
265
- method: "POST",
266
- headers,
267
- path: resolvedPath,
268
- body,
269
- });
177
+ b.m("POST").h(headers).b(body);
178
+ return b.build();
270
179
  };
271
180
  export const se_UntagResourceCommand = async (input, context) => {
272
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
181
+ const b = rb(input, context);
273
182
  const headers = {};
274
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
275
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
183
+ b.bp("/tags/{resourceArn}");
184
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
276
185
  const query = map({
277
- tagKeys: [
186
+ [_tK]: [
278
187
  __expectNonNull(input.tagKeys, `tagKeys`) != null,
279
- () => (input.tagKeys || []).map((_entry) => _entry),
188
+ () => (input[_tK] || []).map((_entry) => _entry),
280
189
  ],
281
190
  });
282
191
  let body;
283
- return new __HttpRequest({
284
- protocol,
285
- hostname,
286
- port,
287
- method: "DELETE",
288
- headers,
289
- path: resolvedPath,
290
- query,
291
- body,
292
- });
192
+ b.m("DELETE").h(headers).q(query).b(body);
193
+ return b.build();
293
194
  };
294
195
  export const se_UpdateEnabledControlCommand = async (input, context) => {
295
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
196
+ const b = rb(input, context);
296
197
  const headers = {
297
198
  "content-type": "application/json",
298
199
  };
299
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-enabled-control";
200
+ b.bp("/update-enabled-control");
300
201
  let body;
301
202
  body = JSON.stringify(take(input, {
302
203
  enabledControlIdentifier: [],
303
204
  parameters: (_) => se_EnabledControlParameters(_, context),
304
205
  }));
305
- return new __HttpRequest({
306
- protocol,
307
- hostname,
308
- port,
309
- method: "POST",
310
- headers,
311
- path: resolvedPath,
312
- body,
313
- });
206
+ b.m("POST").h(headers).b(body);
207
+ return b.build();
314
208
  };
315
209
  export const se_UpdateLandingZoneCommand = async (input, context) => {
316
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
210
+ const b = rb(input, context);
317
211
  const headers = {
318
212
  "content-type": "application/json",
319
213
  };
320
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-landingzone";
214
+ b.bp("/update-landingzone");
321
215
  let body;
322
216
  body = JSON.stringify(take(input, {
323
217
  landingZoneIdentifier: [],
324
218
  manifest: (_) => se_Manifest(_, context),
325
219
  version: [],
326
220
  }));
327
- return new __HttpRequest({
328
- protocol,
329
- hostname,
330
- port,
331
- method: "POST",
332
- headers,
333
- path: resolvedPath,
334
- body,
335
- });
221
+ b.m("POST").h(headers).b(body);
222
+ return b.build();
336
223
  };
337
224
  export const de_CreateLandingZoneCommand = async (output, context) => {
338
225
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1124,10 +1011,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1124
1011
  };
1125
1012
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1126
1013
  const contents = map({
1127
- retryAfterSeconds: [
1128
- () => void 0 !== parsedOutput.headers["retry-after"],
1129
- () => __strictParseInt32(parsedOutput.headers["retry-after"]),
1130
- ],
1014
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
1131
1015
  });
1132
1016
  const data = parsedOutput.body;
1133
1017
  const doc = take(data, {
@@ -1245,6 +1129,9 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1245
1129
  value !== "" &&
1246
1130
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1247
1131
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1132
+ const _rAS = "retryAfterSeconds";
1133
+ const _ra = "retry-after";
1134
+ const _tK = "tagKeys";
1248
1135
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1249
1136
  if (encoded.length) {
1250
1137
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-controltower",
3
3
  "description": "AWS SDK for JavaScript Controltower 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",