@aws-sdk/client-controltower 3.312.0 → 3.315.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.
|
@@ -12,10 +12,10 @@ const se_DisableControlCommand = async (input, context) => {
|
|
|
12
12
|
};
|
|
13
13
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disable-control";
|
|
14
14
|
let body;
|
|
15
|
-
body = JSON.stringify({
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
});
|
|
15
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
16
|
+
controlIdentifier: [],
|
|
17
|
+
targetIdentifier: [],
|
|
18
|
+
}));
|
|
19
19
|
return new protocol_http_1.HttpRequest({
|
|
20
20
|
protocol,
|
|
21
21
|
hostname,
|
|
@@ -34,10 +34,10 @@ const se_EnableControlCommand = async (input, context) => {
|
|
|
34
34
|
};
|
|
35
35
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/enable-control";
|
|
36
36
|
let body;
|
|
37
|
-
body = JSON.stringify({
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
});
|
|
37
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
38
|
+
controlIdentifier: [],
|
|
39
|
+
targetIdentifier: [],
|
|
40
|
+
}));
|
|
41
41
|
return new protocol_http_1.HttpRequest({
|
|
42
42
|
protocol,
|
|
43
43
|
hostname,
|
|
@@ -56,9 +56,9 @@ const se_GetControlOperationCommand = async (input, context) => {
|
|
|
56
56
|
};
|
|
57
57
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-control-operation";
|
|
58
58
|
let body;
|
|
59
|
-
body = JSON.stringify({
|
|
60
|
-
|
|
61
|
-
});
|
|
59
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
60
|
+
operationIdentifier: [],
|
|
61
|
+
}));
|
|
62
62
|
return new protocol_http_1.HttpRequest({
|
|
63
63
|
protocol,
|
|
64
64
|
hostname,
|
|
@@ -77,11 +77,11 @@ const se_ListEnabledControlsCommand = async (input, context) => {
|
|
|
77
77
|
};
|
|
78
78
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-enabled-controls";
|
|
79
79
|
let body;
|
|
80
|
-
body = JSON.stringify({
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
});
|
|
80
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
81
|
+
maxResults: [],
|
|
82
|
+
nextToken: [],
|
|
83
|
+
targetIdentifier: [],
|
|
84
|
+
}));
|
|
85
85
|
return new protocol_http_1.HttpRequest({
|
|
86
86
|
protocol,
|
|
87
87
|
hostname,
|
|
@@ -97,13 +97,14 @@ const de_DisableControlCommand = async (output, context) => {
|
|
|
97
97
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
98
98
|
return de_DisableControlCommandError(output, context);
|
|
99
99
|
}
|
|
100
|
-
const contents = map({
|
|
100
|
+
const contents = (0, smithy_client_1.map)({
|
|
101
101
|
$metadata: deserializeMetadata(output),
|
|
102
102
|
});
|
|
103
103
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
104
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
105
|
+
operationIdentifier: smithy_client_1.expectString,
|
|
106
|
+
});
|
|
107
|
+
Object.assign(contents, doc);
|
|
107
108
|
return contents;
|
|
108
109
|
};
|
|
109
110
|
exports.de_DisableControlCommand = de_DisableControlCommand;
|
|
@@ -137,10 +138,9 @@ const de_DisableControlCommandError = async (output, context) => {
|
|
|
137
138
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
138
139
|
default:
|
|
139
140
|
const parsedBody = parsedOutput.body;
|
|
140
|
-
|
|
141
|
+
return throwDefaultError({
|
|
141
142
|
output,
|
|
142
143
|
parsedBody,
|
|
143
|
-
exceptionCtor: ControlTowerServiceException_1.ControlTowerServiceException,
|
|
144
144
|
errorCode,
|
|
145
145
|
});
|
|
146
146
|
}
|
|
@@ -149,13 +149,14 @@ const de_EnableControlCommand = async (output, context) => {
|
|
|
149
149
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
150
150
|
return de_EnableControlCommandError(output, context);
|
|
151
151
|
}
|
|
152
|
-
const contents = map({
|
|
152
|
+
const contents = (0, smithy_client_1.map)({
|
|
153
153
|
$metadata: deserializeMetadata(output),
|
|
154
154
|
});
|
|
155
155
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
156
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
157
|
+
operationIdentifier: smithy_client_1.expectString,
|
|
158
|
+
});
|
|
159
|
+
Object.assign(contents, doc);
|
|
159
160
|
return contents;
|
|
160
161
|
};
|
|
161
162
|
exports.de_EnableControlCommand = de_EnableControlCommand;
|
|
@@ -189,10 +190,9 @@ const de_EnableControlCommandError = async (output, context) => {
|
|
|
189
190
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
190
191
|
default:
|
|
191
192
|
const parsedBody = parsedOutput.body;
|
|
192
|
-
|
|
193
|
+
return throwDefaultError({
|
|
193
194
|
output,
|
|
194
195
|
parsedBody,
|
|
195
|
-
exceptionCtor: ControlTowerServiceException_1.ControlTowerServiceException,
|
|
196
196
|
errorCode,
|
|
197
197
|
});
|
|
198
198
|
}
|
|
@@ -201,13 +201,14 @@ const de_GetControlOperationCommand = async (output, context) => {
|
|
|
201
201
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
202
202
|
return de_GetControlOperationCommandError(output, context);
|
|
203
203
|
}
|
|
204
|
-
const contents = map({
|
|
204
|
+
const contents = (0, smithy_client_1.map)({
|
|
205
205
|
$metadata: deserializeMetadata(output),
|
|
206
206
|
});
|
|
207
207
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}
|
|
208
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
209
|
+
controlOperation: (_) => de_ControlOperation(_, context),
|
|
210
|
+
});
|
|
211
|
+
Object.assign(contents, doc);
|
|
211
212
|
return contents;
|
|
212
213
|
};
|
|
213
214
|
exports.de_GetControlOperationCommand = de_GetControlOperationCommand;
|
|
@@ -235,10 +236,9 @@ const de_GetControlOperationCommandError = async (output, context) => {
|
|
|
235
236
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
236
237
|
default:
|
|
237
238
|
const parsedBody = parsedOutput.body;
|
|
238
|
-
|
|
239
|
+
return throwDefaultError({
|
|
239
240
|
output,
|
|
240
241
|
parsedBody,
|
|
241
|
-
exceptionCtor: ControlTowerServiceException_1.ControlTowerServiceException,
|
|
242
242
|
errorCode,
|
|
243
243
|
});
|
|
244
244
|
}
|
|
@@ -247,16 +247,15 @@ const de_ListEnabledControlsCommand = async (output, context) => {
|
|
|
247
247
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
248
248
|
return de_ListEnabledControlsCommandError(output, context);
|
|
249
249
|
}
|
|
250
|
-
const contents = map({
|
|
250
|
+
const contents = (0, smithy_client_1.map)({
|
|
251
251
|
$metadata: deserializeMetadata(output),
|
|
252
252
|
});
|
|
253
253
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
}
|
|
254
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
255
|
+
enabledControls: smithy_client_1._json,
|
|
256
|
+
nextToken: smithy_client_1.expectString,
|
|
257
|
+
});
|
|
258
|
+
Object.assign(contents, doc);
|
|
260
259
|
return contents;
|
|
261
260
|
};
|
|
262
261
|
exports.de_ListEnabledControlsCommand = de_ListEnabledControlsCommand;
|
|
@@ -284,21 +283,21 @@ const de_ListEnabledControlsCommandError = async (output, context) => {
|
|
|
284
283
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
285
284
|
default:
|
|
286
285
|
const parsedBody = parsedOutput.body;
|
|
287
|
-
|
|
286
|
+
return throwDefaultError({
|
|
288
287
|
output,
|
|
289
288
|
parsedBody,
|
|
290
|
-
exceptionCtor: ControlTowerServiceException_1.ControlTowerServiceException,
|
|
291
289
|
errorCode,
|
|
292
290
|
});
|
|
293
291
|
}
|
|
294
292
|
};
|
|
295
|
-
const
|
|
293
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(ControlTowerServiceException_1.ControlTowerServiceException);
|
|
296
294
|
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
297
|
-
const contents = map({});
|
|
295
|
+
const contents = (0, smithy_client_1.map)({});
|
|
298
296
|
const data = parsedOutput.body;
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
}
|
|
297
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
298
|
+
message: smithy_client_1.expectString,
|
|
299
|
+
});
|
|
300
|
+
Object.assign(contents, doc);
|
|
302
301
|
const exception = new models_0_1.AccessDeniedException({
|
|
303
302
|
$metadata: deserializeMetadata(parsedOutput),
|
|
304
303
|
...contents,
|
|
@@ -306,11 +305,12 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
|
306
305
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
307
306
|
};
|
|
308
307
|
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
309
|
-
const contents = map({});
|
|
308
|
+
const contents = (0, smithy_client_1.map)({});
|
|
310
309
|
const data = parsedOutput.body;
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
}
|
|
310
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
311
|
+
message: smithy_client_1.expectString,
|
|
312
|
+
});
|
|
313
|
+
Object.assign(contents, doc);
|
|
314
314
|
const exception = new models_0_1.ConflictException({
|
|
315
315
|
$metadata: deserializeMetadata(parsedOutput),
|
|
316
316
|
...contents,
|
|
@@ -318,11 +318,12 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
|
318
318
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
319
319
|
};
|
|
320
320
|
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
321
|
-
const contents = map({});
|
|
321
|
+
const contents = (0, smithy_client_1.map)({});
|
|
322
322
|
const data = parsedOutput.body;
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
}
|
|
323
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
324
|
+
message: smithy_client_1.expectString,
|
|
325
|
+
});
|
|
326
|
+
Object.assign(contents, doc);
|
|
326
327
|
const exception = new models_0_1.InternalServerException({
|
|
327
328
|
$metadata: deserializeMetadata(parsedOutput),
|
|
328
329
|
...contents,
|
|
@@ -330,11 +331,12 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
|
330
331
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
331
332
|
};
|
|
332
333
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
333
|
-
const contents = map({});
|
|
334
|
+
const contents = (0, smithy_client_1.map)({});
|
|
334
335
|
const data = parsedOutput.body;
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
}
|
|
336
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
337
|
+
message: smithy_client_1.expectString,
|
|
338
|
+
});
|
|
339
|
+
Object.assign(contents, doc);
|
|
338
340
|
const exception = new models_0_1.ResourceNotFoundException({
|
|
339
341
|
$metadata: deserializeMetadata(parsedOutput),
|
|
340
342
|
...contents,
|
|
@@ -342,11 +344,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
342
344
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
343
345
|
};
|
|
344
346
|
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
345
|
-
const contents = map({});
|
|
347
|
+
const contents = (0, smithy_client_1.map)({});
|
|
346
348
|
const data = parsedOutput.body;
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}
|
|
349
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
350
|
+
message: smithy_client_1.expectString,
|
|
351
|
+
});
|
|
352
|
+
Object.assign(contents, doc);
|
|
350
353
|
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
351
354
|
$metadata: deserializeMetadata(parsedOutput),
|
|
352
355
|
...contents,
|
|
@@ -354,22 +357,19 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
354
357
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
355
358
|
};
|
|
356
359
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
357
|
-
const contents = map({
|
|
360
|
+
const contents = (0, smithy_client_1.map)({
|
|
358
361
|
retryAfterSeconds: [
|
|
359
362
|
() => void 0 !== parsedOutput.headers["retry-after"],
|
|
360
363
|
() => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
|
|
361
364
|
],
|
|
362
365
|
});
|
|
363
366
|
const data = parsedOutput.body;
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
if (data.serviceCode != null) {
|
|
371
|
-
contents.serviceCode = (0, smithy_client_1.expectString)(data.serviceCode);
|
|
372
|
-
}
|
|
367
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
368
|
+
message: smithy_client_1.expectString,
|
|
369
|
+
quotaCode: smithy_client_1.expectString,
|
|
370
|
+
serviceCode: smithy_client_1.expectString,
|
|
371
|
+
});
|
|
372
|
+
Object.assign(contents, doc);
|
|
373
373
|
const exception = new models_0_1.ThrottlingException({
|
|
374
374
|
$metadata: deserializeMetadata(parsedOutput),
|
|
375
375
|
...contents,
|
|
@@ -377,11 +377,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
|
377
377
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
378
378
|
};
|
|
379
379
|
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
380
|
-
const contents = map({});
|
|
380
|
+
const contents = (0, smithy_client_1.map)({});
|
|
381
381
|
const data = parsedOutput.body;
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
}
|
|
382
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
383
|
+
message: smithy_client_1.expectString,
|
|
384
|
+
});
|
|
385
|
+
Object.assign(contents, doc);
|
|
385
386
|
const exception = new models_0_1.ValidationException({
|
|
386
387
|
$metadata: deserializeMetadata(parsedOutput),
|
|
387
388
|
...contents,
|
|
@@ -389,29 +390,13 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
389
390
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
390
391
|
};
|
|
391
392
|
const de_ControlOperation = (output, context) => {
|
|
392
|
-
return {
|
|
393
|
-
endTime:
|
|
394
|
-
operationType:
|
|
395
|
-
startTime:
|
|
396
|
-
status:
|
|
397
|
-
statusMessage:
|
|
398
|
-
};
|
|
399
|
-
};
|
|
400
|
-
const de_EnabledControls = (output, context) => {
|
|
401
|
-
const retVal = (output || [])
|
|
402
|
-
.filter((e) => e != null)
|
|
403
|
-
.map((entry) => {
|
|
404
|
-
if (entry === null) {
|
|
405
|
-
return null;
|
|
406
|
-
}
|
|
407
|
-
return de_EnabledControlSummary(entry, context);
|
|
393
|
+
return (0, smithy_client_1.take)(output, {
|
|
394
|
+
endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
395
|
+
operationType: smithy_client_1.expectString,
|
|
396
|
+
startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
397
|
+
status: smithy_client_1.expectString,
|
|
398
|
+
statusMessage: smithy_client_1.expectString,
|
|
408
399
|
});
|
|
409
|
-
return retVal;
|
|
410
|
-
};
|
|
411
|
-
const de_EnabledControlSummary = (output, context) => {
|
|
412
|
-
return {
|
|
413
|
-
controlIdentifier: (0, smithy_client_1.expectString)(output.controlIdentifier),
|
|
414
|
-
};
|
|
415
400
|
};
|
|
416
401
|
const deserializeMetadata = (output) => ({
|
|
417
402
|
httpStatusCode: output.statusCode,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
|
-
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map
|
|
2
|
+
import { _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@aws-sdk/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_DisableControlCommand = async (input, context) => {
|
|
@@ -9,10 +9,10 @@ export const se_DisableControlCommand = async (input, context) => {
|
|
|
9
9
|
};
|
|
10
10
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disable-control";
|
|
11
11
|
let body;
|
|
12
|
-
body = JSON.stringify({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
});
|
|
12
|
+
body = JSON.stringify(take(input, {
|
|
13
|
+
controlIdentifier: [],
|
|
14
|
+
targetIdentifier: [],
|
|
15
|
+
}));
|
|
16
16
|
return new __HttpRequest({
|
|
17
17
|
protocol,
|
|
18
18
|
hostname,
|
|
@@ -30,10 +30,10 @@ export const se_EnableControlCommand = async (input, context) => {
|
|
|
30
30
|
};
|
|
31
31
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/enable-control";
|
|
32
32
|
let body;
|
|
33
|
-
body = JSON.stringify({
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
});
|
|
33
|
+
body = JSON.stringify(take(input, {
|
|
34
|
+
controlIdentifier: [],
|
|
35
|
+
targetIdentifier: [],
|
|
36
|
+
}));
|
|
37
37
|
return new __HttpRequest({
|
|
38
38
|
protocol,
|
|
39
39
|
hostname,
|
|
@@ -51,9 +51,9 @@ export const se_GetControlOperationCommand = async (input, context) => {
|
|
|
51
51
|
};
|
|
52
52
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-control-operation";
|
|
53
53
|
let body;
|
|
54
|
-
body = JSON.stringify({
|
|
55
|
-
|
|
56
|
-
});
|
|
54
|
+
body = JSON.stringify(take(input, {
|
|
55
|
+
operationIdentifier: [],
|
|
56
|
+
}));
|
|
57
57
|
return new __HttpRequest({
|
|
58
58
|
protocol,
|
|
59
59
|
hostname,
|
|
@@ -71,11 +71,11 @@ export const se_ListEnabledControlsCommand = async (input, context) => {
|
|
|
71
71
|
};
|
|
72
72
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-enabled-controls";
|
|
73
73
|
let body;
|
|
74
|
-
body = JSON.stringify({
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
});
|
|
74
|
+
body = JSON.stringify(take(input, {
|
|
75
|
+
maxResults: [],
|
|
76
|
+
nextToken: [],
|
|
77
|
+
targetIdentifier: [],
|
|
78
|
+
}));
|
|
79
79
|
return new __HttpRequest({
|
|
80
80
|
protocol,
|
|
81
81
|
hostname,
|
|
@@ -94,9 +94,10 @@ export const de_DisableControlCommand = async (output, context) => {
|
|
|
94
94
|
$metadata: deserializeMetadata(output),
|
|
95
95
|
});
|
|
96
96
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
97
|
+
const doc = take(data, {
|
|
98
|
+
operationIdentifier: __expectString,
|
|
99
|
+
});
|
|
100
|
+
Object.assign(contents, doc);
|
|
100
101
|
return contents;
|
|
101
102
|
};
|
|
102
103
|
const de_DisableControlCommandError = async (output, context) => {
|
|
@@ -129,10 +130,9 @@ const de_DisableControlCommandError = async (output, context) => {
|
|
|
129
130
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
130
131
|
default:
|
|
131
132
|
const parsedBody = parsedOutput.body;
|
|
132
|
-
throwDefaultError({
|
|
133
|
+
return throwDefaultError({
|
|
133
134
|
output,
|
|
134
135
|
parsedBody,
|
|
135
|
-
exceptionCtor: __BaseException,
|
|
136
136
|
errorCode,
|
|
137
137
|
});
|
|
138
138
|
}
|
|
@@ -145,9 +145,10 @@ export const de_EnableControlCommand = async (output, context) => {
|
|
|
145
145
|
$metadata: deserializeMetadata(output),
|
|
146
146
|
});
|
|
147
147
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
148
|
+
const doc = take(data, {
|
|
149
|
+
operationIdentifier: __expectString,
|
|
150
|
+
});
|
|
151
|
+
Object.assign(contents, doc);
|
|
151
152
|
return contents;
|
|
152
153
|
};
|
|
153
154
|
const de_EnableControlCommandError = async (output, context) => {
|
|
@@ -180,10 +181,9 @@ const de_EnableControlCommandError = async (output, context) => {
|
|
|
180
181
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
181
182
|
default:
|
|
182
183
|
const parsedBody = parsedOutput.body;
|
|
183
|
-
throwDefaultError({
|
|
184
|
+
return throwDefaultError({
|
|
184
185
|
output,
|
|
185
186
|
parsedBody,
|
|
186
|
-
exceptionCtor: __BaseException,
|
|
187
187
|
errorCode,
|
|
188
188
|
});
|
|
189
189
|
}
|
|
@@ -196,9 +196,10 @@ export const de_GetControlOperationCommand = async (output, context) => {
|
|
|
196
196
|
$metadata: deserializeMetadata(output),
|
|
197
197
|
});
|
|
198
198
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
199
|
+
const doc = take(data, {
|
|
200
|
+
controlOperation: (_) => de_ControlOperation(_, context),
|
|
201
|
+
});
|
|
202
|
+
Object.assign(contents, doc);
|
|
202
203
|
return contents;
|
|
203
204
|
};
|
|
204
205
|
const de_GetControlOperationCommandError = async (output, context) => {
|
|
@@ -225,10 +226,9 @@ const de_GetControlOperationCommandError = async (output, context) => {
|
|
|
225
226
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
226
227
|
default:
|
|
227
228
|
const parsedBody = parsedOutput.body;
|
|
228
|
-
throwDefaultError({
|
|
229
|
+
return throwDefaultError({
|
|
229
230
|
output,
|
|
230
231
|
parsedBody,
|
|
231
|
-
exceptionCtor: __BaseException,
|
|
232
232
|
errorCode,
|
|
233
233
|
});
|
|
234
234
|
}
|
|
@@ -241,12 +241,11 @@ export const de_ListEnabledControlsCommand = async (output, context) => {
|
|
|
241
241
|
$metadata: deserializeMetadata(output),
|
|
242
242
|
});
|
|
243
243
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
}
|
|
244
|
+
const doc = take(data, {
|
|
245
|
+
enabledControls: _json,
|
|
246
|
+
nextToken: __expectString,
|
|
247
|
+
});
|
|
248
|
+
Object.assign(contents, doc);
|
|
250
249
|
return contents;
|
|
251
250
|
};
|
|
252
251
|
const de_ListEnabledControlsCommandError = async (output, context) => {
|
|
@@ -273,21 +272,21 @@ const de_ListEnabledControlsCommandError = async (output, context) => {
|
|
|
273
272
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
274
273
|
default:
|
|
275
274
|
const parsedBody = parsedOutput.body;
|
|
276
|
-
throwDefaultError({
|
|
275
|
+
return throwDefaultError({
|
|
277
276
|
output,
|
|
278
277
|
parsedBody,
|
|
279
|
-
exceptionCtor: __BaseException,
|
|
280
278
|
errorCode,
|
|
281
279
|
});
|
|
282
280
|
}
|
|
283
281
|
};
|
|
284
|
-
const
|
|
282
|
+
const throwDefaultError = withBaseException(__BaseException);
|
|
285
283
|
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
286
284
|
const contents = map({});
|
|
287
285
|
const data = parsedOutput.body;
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
}
|
|
286
|
+
const doc = take(data, {
|
|
287
|
+
message: __expectString,
|
|
288
|
+
});
|
|
289
|
+
Object.assign(contents, doc);
|
|
291
290
|
const exception = new AccessDeniedException({
|
|
292
291
|
$metadata: deserializeMetadata(parsedOutput),
|
|
293
292
|
...contents,
|
|
@@ -297,9 +296,10 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
|
297
296
|
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
298
297
|
const contents = map({});
|
|
299
298
|
const data = parsedOutput.body;
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
}
|
|
299
|
+
const doc = take(data, {
|
|
300
|
+
message: __expectString,
|
|
301
|
+
});
|
|
302
|
+
Object.assign(contents, doc);
|
|
303
303
|
const exception = new ConflictException({
|
|
304
304
|
$metadata: deserializeMetadata(parsedOutput),
|
|
305
305
|
...contents,
|
|
@@ -309,9 +309,10 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
|
309
309
|
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
310
310
|
const contents = map({});
|
|
311
311
|
const data = parsedOutput.body;
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
}
|
|
312
|
+
const doc = take(data, {
|
|
313
|
+
message: __expectString,
|
|
314
|
+
});
|
|
315
|
+
Object.assign(contents, doc);
|
|
315
316
|
const exception = new InternalServerException({
|
|
316
317
|
$metadata: deserializeMetadata(parsedOutput),
|
|
317
318
|
...contents,
|
|
@@ -321,9 +322,10 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
|
321
322
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
322
323
|
const contents = map({});
|
|
323
324
|
const data = parsedOutput.body;
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
}
|
|
325
|
+
const doc = take(data, {
|
|
326
|
+
message: __expectString,
|
|
327
|
+
});
|
|
328
|
+
Object.assign(contents, doc);
|
|
327
329
|
const exception = new ResourceNotFoundException({
|
|
328
330
|
$metadata: deserializeMetadata(parsedOutput),
|
|
329
331
|
...contents,
|
|
@@ -333,9 +335,10 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
333
335
|
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
334
336
|
const contents = map({});
|
|
335
337
|
const data = parsedOutput.body;
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
}
|
|
338
|
+
const doc = take(data, {
|
|
339
|
+
message: __expectString,
|
|
340
|
+
});
|
|
341
|
+
Object.assign(contents, doc);
|
|
339
342
|
const exception = new ServiceQuotaExceededException({
|
|
340
343
|
$metadata: deserializeMetadata(parsedOutput),
|
|
341
344
|
...contents,
|
|
@@ -350,15 +353,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
|
350
353
|
],
|
|
351
354
|
});
|
|
352
355
|
const data = parsedOutput.body;
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
if (data.serviceCode != null) {
|
|
360
|
-
contents.serviceCode = __expectString(data.serviceCode);
|
|
361
|
-
}
|
|
356
|
+
const doc = take(data, {
|
|
357
|
+
message: __expectString,
|
|
358
|
+
quotaCode: __expectString,
|
|
359
|
+
serviceCode: __expectString,
|
|
360
|
+
});
|
|
361
|
+
Object.assign(contents, doc);
|
|
362
362
|
const exception = new ThrottlingException({
|
|
363
363
|
$metadata: deserializeMetadata(parsedOutput),
|
|
364
364
|
...contents,
|
|
@@ -368,9 +368,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
|
368
368
|
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
369
369
|
const contents = map({});
|
|
370
370
|
const data = parsedOutput.body;
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
}
|
|
371
|
+
const doc = take(data, {
|
|
372
|
+
message: __expectString,
|
|
373
|
+
});
|
|
374
|
+
Object.assign(contents, doc);
|
|
374
375
|
const exception = new ValidationException({
|
|
375
376
|
$metadata: deserializeMetadata(parsedOutput),
|
|
376
377
|
...contents,
|
|
@@ -378,29 +379,13 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
378
379
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
379
380
|
};
|
|
380
381
|
const de_ControlOperation = (output, context) => {
|
|
381
|
-
return {
|
|
382
|
-
endTime:
|
|
383
|
-
operationType: __expectString
|
|
384
|
-
startTime:
|
|
385
|
-
status: __expectString
|
|
386
|
-
statusMessage: __expectString
|
|
387
|
-
};
|
|
388
|
-
};
|
|
389
|
-
const de_EnabledControls = (output, context) => {
|
|
390
|
-
const retVal = (output || [])
|
|
391
|
-
.filter((e) => e != null)
|
|
392
|
-
.map((entry) => {
|
|
393
|
-
if (entry === null) {
|
|
394
|
-
return null;
|
|
395
|
-
}
|
|
396
|
-
return de_EnabledControlSummary(entry, context);
|
|
382
|
+
return take(output, {
|
|
383
|
+
endTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
384
|
+
operationType: __expectString,
|
|
385
|
+
startTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
386
|
+
status: __expectString,
|
|
387
|
+
statusMessage: __expectString,
|
|
397
388
|
});
|
|
398
|
-
return retVal;
|
|
399
|
-
};
|
|
400
|
-
const de_EnabledControlSummary = (output, context) => {
|
|
401
|
-
return {
|
|
402
|
-
controlIdentifier: __expectString(output.controlIdentifier),
|
|
403
|
-
};
|
|
404
389
|
};
|
|
405
390
|
const deserializeMetadata = (output) => ({
|
|
406
391
|
httpStatusCode: output.statusCode,
|
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.
|
|
4
|
+
"version": "3.315.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",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
+
"@aws-sdk/client-sts": "3.315.0",
|
|
25
25
|
"@aws-sdk/config-resolver": "3.310.0",
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.315.0",
|
|
27
27
|
"@aws-sdk/fetch-http-handler": "3.310.0",
|
|
28
28
|
"@aws-sdk/hash-node": "3.310.0",
|
|
29
29
|
"@aws-sdk/invalid-dependency": "3.310.0",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"@aws-sdk/node-config-provider": "3.310.0",
|
|
41
41
|
"@aws-sdk/node-http-handler": "3.310.0",
|
|
42
42
|
"@aws-sdk/protocol-http": "3.310.0",
|
|
43
|
-
"@aws-sdk/smithy-client": "3.
|
|
43
|
+
"@aws-sdk/smithy-client": "3.315.0",
|
|
44
44
|
"@aws-sdk/types": "3.310.0",
|
|
45
45
|
"@aws-sdk/url-parser": "3.310.0",
|
|
46
46
|
"@aws-sdk/util-base64": "3.310.0",
|
|
47
47
|
"@aws-sdk/util-body-length-browser": "3.310.0",
|
|
48
48
|
"@aws-sdk/util-body-length-node": "3.310.0",
|
|
49
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
50
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
49
|
+
"@aws-sdk/util-defaults-mode-browser": "3.315.0",
|
|
50
|
+
"@aws-sdk/util-defaults-mode-node": "3.315.0",
|
|
51
51
|
"@aws-sdk/util-endpoints": "3.310.0",
|
|
52
52
|
"@aws-sdk/util-retry": "3.310.0",
|
|
53
53
|
"@aws-sdk/util-user-agent-browser": "3.310.0",
|