@aws-sdk/client-codeguru-security 3.928.0 → 3.929.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.js +720 -693
- package/dist-cjs/runtimeConfig.shared.js +2 -0
- package/dist-es/CodeGuruSecurityClient.js +2 -0
- package/dist-es/commands/BatchGetFindingsCommand.js +3 -9
- package/dist-es/commands/CreateScanCommand.js +3 -9
- package/dist-es/commands/CreateUploadUrlCommand.js +3 -10
- package/dist-es/commands/GetAccountConfigurationCommand.js +3 -9
- package/dist-es/commands/GetFindingsCommand.js +3 -9
- package/dist-es/commands/GetMetricsSummaryCommand.js +3 -9
- package/dist-es/commands/GetScanCommand.js +3 -9
- package/dist-es/commands/ListFindingsMetricsCommand.js +3 -9
- package/dist-es/commands/ListScansCommand.js +3 -9
- package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
- package/dist-es/commands/TagResourceCommand.js +3 -9
- package/dist-es/commands/UntagResourceCommand.js +3 -9
- package/dist-es/commands/UpdateAccountConfigurationCommand.js +3 -9
- package/dist-es/models/models_0.js +0 -6
- package/dist-es/runtimeConfig.shared.js +2 -0
- package/dist-es/schemas/schemas_0.js +687 -0
- package/dist-types/CodeGuruSecurityClient.d.ts +10 -1
- package/dist-types/models/models_0.d.ts +0 -4
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +85 -0
- package/dist-types/ts3.4/CodeGuruSecurityClient.d.ts +4 -0
- package/dist-types/ts3.4/models/models_0.d.ts +0 -3
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +92 -0
- package/package.json +2 -3
- package/dist-es/protocols/Aws_restJson1.js +0 -586
- package/dist-types/protocols/Aws_restJson1.d.ts +0 -119
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -161
|
@@ -1,586 +0,0 @@
|
|
|
1
|
-
import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
|
|
2
|
-
import { requestBuilder as rb } from "@smithy/core";
|
|
3
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseEpochTimestamp as __parseEpochTimestamp, serializeDateTime as __serializeDateTime, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
-
import { v4 as generateIdempotencyToken } from "@smithy/uuid";
|
|
5
|
-
import { CodeGuruSecurityServiceException as __BaseException } from "../models/CodeGuruSecurityServiceException";
|
|
6
|
-
import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
7
|
-
export const se_BatchGetFindingsCommand = async (input, context) => {
|
|
8
|
-
const b = rb(input, context);
|
|
9
|
-
const headers = {
|
|
10
|
-
"content-type": "application/json",
|
|
11
|
-
};
|
|
12
|
-
b.bp("/batchGetFindings");
|
|
13
|
-
let body;
|
|
14
|
-
body = JSON.stringify(take(input, {
|
|
15
|
-
findingIdentifiers: (_) => _json(_),
|
|
16
|
-
}));
|
|
17
|
-
b.m("POST").h(headers).b(body);
|
|
18
|
-
return b.build();
|
|
19
|
-
};
|
|
20
|
-
export const se_CreateScanCommand = async (input, context) => {
|
|
21
|
-
const b = rb(input, context);
|
|
22
|
-
const headers = {
|
|
23
|
-
"content-type": "application/json",
|
|
24
|
-
};
|
|
25
|
-
b.bp("/scans");
|
|
26
|
-
let body;
|
|
27
|
-
body = JSON.stringify(take(input, {
|
|
28
|
-
analysisType: [],
|
|
29
|
-
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
30
|
-
resourceId: (_) => _json(_),
|
|
31
|
-
scanName: [],
|
|
32
|
-
scanType: [],
|
|
33
|
-
tags: (_) => _json(_),
|
|
34
|
-
}));
|
|
35
|
-
b.m("POST").h(headers).b(body);
|
|
36
|
-
return b.build();
|
|
37
|
-
};
|
|
38
|
-
export const se_CreateUploadUrlCommand = async (input, context) => {
|
|
39
|
-
const b = rb(input, context);
|
|
40
|
-
const headers = {
|
|
41
|
-
"content-type": "application/json",
|
|
42
|
-
};
|
|
43
|
-
b.bp("/uploadUrl");
|
|
44
|
-
let body;
|
|
45
|
-
body = JSON.stringify(take(input, {
|
|
46
|
-
scanName: [],
|
|
47
|
-
}));
|
|
48
|
-
b.m("POST").h(headers).b(body);
|
|
49
|
-
return b.build();
|
|
50
|
-
};
|
|
51
|
-
export const se_GetAccountConfigurationCommand = async (input, context) => {
|
|
52
|
-
const b = rb(input, context);
|
|
53
|
-
const headers = {};
|
|
54
|
-
b.bp("/accountConfiguration/get");
|
|
55
|
-
let body;
|
|
56
|
-
b.m("GET").h(headers).b(body);
|
|
57
|
-
return b.build();
|
|
58
|
-
};
|
|
59
|
-
export const se_GetFindingsCommand = async (input, context) => {
|
|
60
|
-
const b = rb(input, context);
|
|
61
|
-
const headers = {};
|
|
62
|
-
b.bp("/findings/{scanName}");
|
|
63
|
-
b.p("scanName", () => input.scanName, "{scanName}", false);
|
|
64
|
-
const query = map({
|
|
65
|
-
[_nT]: [, input[_nT]],
|
|
66
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
67
|
-
[_s]: [, input[_s]],
|
|
68
|
-
});
|
|
69
|
-
let body;
|
|
70
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
71
|
-
return b.build();
|
|
72
|
-
};
|
|
73
|
-
export const se_GetMetricsSummaryCommand = async (input, context) => {
|
|
74
|
-
const b = rb(input, context);
|
|
75
|
-
const headers = {};
|
|
76
|
-
b.bp("/metrics/summary");
|
|
77
|
-
const query = map({
|
|
78
|
-
[_d]: [__expectNonNull(input.date, `date`) != null, () => __serializeDateTime(input[_d]).toString()],
|
|
79
|
-
});
|
|
80
|
-
let body;
|
|
81
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
82
|
-
return b.build();
|
|
83
|
-
};
|
|
84
|
-
export const se_GetScanCommand = async (input, context) => {
|
|
85
|
-
const b = rb(input, context);
|
|
86
|
-
const headers = {};
|
|
87
|
-
b.bp("/scans/{scanName}");
|
|
88
|
-
b.p("scanName", () => input.scanName, "{scanName}", false);
|
|
89
|
-
const query = map({
|
|
90
|
-
[_rI]: [, input[_rI]],
|
|
91
|
-
});
|
|
92
|
-
let body;
|
|
93
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
94
|
-
return b.build();
|
|
95
|
-
};
|
|
96
|
-
export const se_ListFindingsMetricsCommand = async (input, context) => {
|
|
97
|
-
const b = rb(input, context);
|
|
98
|
-
const headers = {};
|
|
99
|
-
b.bp("/metrics/findings");
|
|
100
|
-
const query = map({
|
|
101
|
-
[_nT]: [, input[_nT]],
|
|
102
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
103
|
-
[_sD]: [__expectNonNull(input.startDate, `startDate`) != null, () => __serializeDateTime(input[_sD]).toString()],
|
|
104
|
-
[_eD]: [__expectNonNull(input.endDate, `endDate`) != null, () => __serializeDateTime(input[_eD]).toString()],
|
|
105
|
-
});
|
|
106
|
-
let body;
|
|
107
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
108
|
-
return b.build();
|
|
109
|
-
};
|
|
110
|
-
export const se_ListScansCommand = async (input, context) => {
|
|
111
|
-
const b = rb(input, context);
|
|
112
|
-
const headers = {};
|
|
113
|
-
b.bp("/scans");
|
|
114
|
-
const query = map({
|
|
115
|
-
[_nT]: [, input[_nT]],
|
|
116
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
117
|
-
});
|
|
118
|
-
let body;
|
|
119
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
120
|
-
return b.build();
|
|
121
|
-
};
|
|
122
|
-
export const se_ListTagsForResourceCommand = async (input, context) => {
|
|
123
|
-
const b = rb(input, context);
|
|
124
|
-
const headers = {};
|
|
125
|
-
b.bp("/tags/{resourceArn}");
|
|
126
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
127
|
-
let body;
|
|
128
|
-
b.m("GET").h(headers).b(body);
|
|
129
|
-
return b.build();
|
|
130
|
-
};
|
|
131
|
-
export const se_TagResourceCommand = async (input, context) => {
|
|
132
|
-
const b = rb(input, context);
|
|
133
|
-
const headers = {
|
|
134
|
-
"content-type": "application/json",
|
|
135
|
-
};
|
|
136
|
-
b.bp("/tags/{resourceArn}");
|
|
137
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
138
|
-
let body;
|
|
139
|
-
body = JSON.stringify(take(input, {
|
|
140
|
-
tags: (_) => _json(_),
|
|
141
|
-
}));
|
|
142
|
-
b.m("POST").h(headers).b(body);
|
|
143
|
-
return b.build();
|
|
144
|
-
};
|
|
145
|
-
export const se_UntagResourceCommand = async (input, context) => {
|
|
146
|
-
const b = rb(input, context);
|
|
147
|
-
const headers = {};
|
|
148
|
-
b.bp("/tags/{resourceArn}");
|
|
149
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
150
|
-
const query = map({
|
|
151
|
-
[_tK]: [__expectNonNull(input.tagKeys, `tagKeys`) != null, () => input[_tK] || []],
|
|
152
|
-
});
|
|
153
|
-
let body;
|
|
154
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
155
|
-
return b.build();
|
|
156
|
-
};
|
|
157
|
-
export const se_UpdateAccountConfigurationCommand = async (input, context) => {
|
|
158
|
-
const b = rb(input, context);
|
|
159
|
-
const headers = {
|
|
160
|
-
"content-type": "application/json",
|
|
161
|
-
};
|
|
162
|
-
b.bp("/updateAccountConfiguration");
|
|
163
|
-
let body;
|
|
164
|
-
body = JSON.stringify(take(input, {
|
|
165
|
-
encryptionConfig: (_) => _json(_),
|
|
166
|
-
}));
|
|
167
|
-
b.m("PUT").h(headers).b(body);
|
|
168
|
-
return b.build();
|
|
169
|
-
};
|
|
170
|
-
export const de_BatchGetFindingsCommand = async (output, context) => {
|
|
171
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
172
|
-
return de_CommandError(output, context);
|
|
173
|
-
}
|
|
174
|
-
const contents = map({
|
|
175
|
-
$metadata: deserializeMetadata(output),
|
|
176
|
-
});
|
|
177
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
178
|
-
const doc = take(data, {
|
|
179
|
-
failedFindings: _json,
|
|
180
|
-
findings: (_) => de_Findings(_, context),
|
|
181
|
-
});
|
|
182
|
-
Object.assign(contents, doc);
|
|
183
|
-
return contents;
|
|
184
|
-
};
|
|
185
|
-
export const de_CreateScanCommand = async (output, context) => {
|
|
186
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
187
|
-
return de_CommandError(output, context);
|
|
188
|
-
}
|
|
189
|
-
const contents = map({
|
|
190
|
-
$metadata: deserializeMetadata(output),
|
|
191
|
-
});
|
|
192
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
193
|
-
const doc = take(data, {
|
|
194
|
-
resourceId: (_) => _json(__expectUnion(_)),
|
|
195
|
-
runId: __expectString,
|
|
196
|
-
scanName: __expectString,
|
|
197
|
-
scanNameArn: __expectString,
|
|
198
|
-
scanState: __expectString,
|
|
199
|
-
});
|
|
200
|
-
Object.assign(contents, doc);
|
|
201
|
-
return contents;
|
|
202
|
-
};
|
|
203
|
-
export const de_CreateUploadUrlCommand = async (output, context) => {
|
|
204
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
205
|
-
return de_CommandError(output, context);
|
|
206
|
-
}
|
|
207
|
-
const contents = map({
|
|
208
|
-
$metadata: deserializeMetadata(output),
|
|
209
|
-
});
|
|
210
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
211
|
-
const doc = take(data, {
|
|
212
|
-
codeArtifactId: __expectString,
|
|
213
|
-
requestHeaders: _json,
|
|
214
|
-
s3Url: __expectString,
|
|
215
|
-
});
|
|
216
|
-
Object.assign(contents, doc);
|
|
217
|
-
return contents;
|
|
218
|
-
};
|
|
219
|
-
export const de_GetAccountConfigurationCommand = async (output, context) => {
|
|
220
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
221
|
-
return de_CommandError(output, context);
|
|
222
|
-
}
|
|
223
|
-
const contents = map({
|
|
224
|
-
$metadata: deserializeMetadata(output),
|
|
225
|
-
});
|
|
226
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
227
|
-
const doc = take(data, {
|
|
228
|
-
encryptionConfig: _json,
|
|
229
|
-
});
|
|
230
|
-
Object.assign(contents, doc);
|
|
231
|
-
return contents;
|
|
232
|
-
};
|
|
233
|
-
export const de_GetFindingsCommand = async (output, context) => {
|
|
234
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
235
|
-
return de_CommandError(output, context);
|
|
236
|
-
}
|
|
237
|
-
const contents = map({
|
|
238
|
-
$metadata: deserializeMetadata(output),
|
|
239
|
-
});
|
|
240
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
241
|
-
const doc = take(data, {
|
|
242
|
-
findings: (_) => de_Findings(_, context),
|
|
243
|
-
nextToken: __expectString,
|
|
244
|
-
});
|
|
245
|
-
Object.assign(contents, doc);
|
|
246
|
-
return contents;
|
|
247
|
-
};
|
|
248
|
-
export const de_GetMetricsSummaryCommand = async (output, context) => {
|
|
249
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
250
|
-
return de_CommandError(output, context);
|
|
251
|
-
}
|
|
252
|
-
const contents = map({
|
|
253
|
-
$metadata: deserializeMetadata(output),
|
|
254
|
-
});
|
|
255
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
256
|
-
const doc = take(data, {
|
|
257
|
-
metricsSummary: (_) => de_MetricsSummary(_, context),
|
|
258
|
-
});
|
|
259
|
-
Object.assign(contents, doc);
|
|
260
|
-
return contents;
|
|
261
|
-
};
|
|
262
|
-
export const de_GetScanCommand = async (output, context) => {
|
|
263
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
264
|
-
return de_CommandError(output, context);
|
|
265
|
-
}
|
|
266
|
-
const contents = map({
|
|
267
|
-
$metadata: deserializeMetadata(output),
|
|
268
|
-
});
|
|
269
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
270
|
-
const doc = take(data, {
|
|
271
|
-
analysisType: __expectString,
|
|
272
|
-
createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
273
|
-
errorMessage: __expectString,
|
|
274
|
-
numberOfRevisions: __expectLong,
|
|
275
|
-
runId: __expectString,
|
|
276
|
-
scanName: __expectString,
|
|
277
|
-
scanNameArn: __expectString,
|
|
278
|
-
scanState: __expectString,
|
|
279
|
-
updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
280
|
-
});
|
|
281
|
-
Object.assign(contents, doc);
|
|
282
|
-
return contents;
|
|
283
|
-
};
|
|
284
|
-
export const de_ListFindingsMetricsCommand = async (output, context) => {
|
|
285
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
286
|
-
return de_CommandError(output, context);
|
|
287
|
-
}
|
|
288
|
-
const contents = map({
|
|
289
|
-
$metadata: deserializeMetadata(output),
|
|
290
|
-
});
|
|
291
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
292
|
-
const doc = take(data, {
|
|
293
|
-
findingsMetrics: (_) => de_FindingsMetricList(_, context),
|
|
294
|
-
nextToken: __expectString,
|
|
295
|
-
});
|
|
296
|
-
Object.assign(contents, doc);
|
|
297
|
-
return contents;
|
|
298
|
-
};
|
|
299
|
-
export const de_ListScansCommand = async (output, context) => {
|
|
300
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
301
|
-
return de_CommandError(output, context);
|
|
302
|
-
}
|
|
303
|
-
const contents = map({
|
|
304
|
-
$metadata: deserializeMetadata(output),
|
|
305
|
-
});
|
|
306
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
307
|
-
const doc = take(data, {
|
|
308
|
-
nextToken: __expectString,
|
|
309
|
-
summaries: (_) => de_ScanSummaries(_, context),
|
|
310
|
-
});
|
|
311
|
-
Object.assign(contents, doc);
|
|
312
|
-
return contents;
|
|
313
|
-
};
|
|
314
|
-
export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
315
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
316
|
-
return de_CommandError(output, context);
|
|
317
|
-
}
|
|
318
|
-
const contents = map({
|
|
319
|
-
$metadata: deserializeMetadata(output),
|
|
320
|
-
});
|
|
321
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
322
|
-
const doc = take(data, {
|
|
323
|
-
tags: _json,
|
|
324
|
-
});
|
|
325
|
-
Object.assign(contents, doc);
|
|
326
|
-
return contents;
|
|
327
|
-
};
|
|
328
|
-
export const de_TagResourceCommand = async (output, context) => {
|
|
329
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
330
|
-
return de_CommandError(output, context);
|
|
331
|
-
}
|
|
332
|
-
const contents = map({
|
|
333
|
-
$metadata: deserializeMetadata(output),
|
|
334
|
-
});
|
|
335
|
-
await collectBody(output.body, context);
|
|
336
|
-
return contents;
|
|
337
|
-
};
|
|
338
|
-
export const de_UntagResourceCommand = async (output, context) => {
|
|
339
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
340
|
-
return de_CommandError(output, context);
|
|
341
|
-
}
|
|
342
|
-
const contents = map({
|
|
343
|
-
$metadata: deserializeMetadata(output),
|
|
344
|
-
});
|
|
345
|
-
await collectBody(output.body, context);
|
|
346
|
-
return contents;
|
|
347
|
-
};
|
|
348
|
-
export const de_UpdateAccountConfigurationCommand = async (output, context) => {
|
|
349
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
350
|
-
return de_CommandError(output, context);
|
|
351
|
-
}
|
|
352
|
-
const contents = map({
|
|
353
|
-
$metadata: deserializeMetadata(output),
|
|
354
|
-
});
|
|
355
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
356
|
-
const doc = take(data, {
|
|
357
|
-
encryptionConfig: _json,
|
|
358
|
-
});
|
|
359
|
-
Object.assign(contents, doc);
|
|
360
|
-
return contents;
|
|
361
|
-
};
|
|
362
|
-
const de_CommandError = async (output, context) => {
|
|
363
|
-
const parsedOutput = {
|
|
364
|
-
...output,
|
|
365
|
-
body: await parseErrorBody(output.body, context),
|
|
366
|
-
};
|
|
367
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
368
|
-
switch (errorCode) {
|
|
369
|
-
case "AccessDeniedException":
|
|
370
|
-
case "com.amazonaws.codegurusecurity#AccessDeniedException":
|
|
371
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
372
|
-
case "InternalServerException":
|
|
373
|
-
case "com.amazonaws.codegurusecurity#InternalServerException":
|
|
374
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
375
|
-
case "ThrottlingException":
|
|
376
|
-
case "com.amazonaws.codegurusecurity#ThrottlingException":
|
|
377
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
378
|
-
case "ValidationException":
|
|
379
|
-
case "com.amazonaws.codegurusecurity#ValidationException":
|
|
380
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
381
|
-
case "ConflictException":
|
|
382
|
-
case "com.amazonaws.codegurusecurity#ConflictException":
|
|
383
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
384
|
-
case "ResourceNotFoundException":
|
|
385
|
-
case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
|
|
386
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
387
|
-
default:
|
|
388
|
-
const parsedBody = parsedOutput.body;
|
|
389
|
-
return throwDefaultError({
|
|
390
|
-
output,
|
|
391
|
-
parsedBody,
|
|
392
|
-
errorCode,
|
|
393
|
-
});
|
|
394
|
-
}
|
|
395
|
-
};
|
|
396
|
-
const throwDefaultError = withBaseException(__BaseException);
|
|
397
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
398
|
-
const contents = map({});
|
|
399
|
-
const data = parsedOutput.body;
|
|
400
|
-
const doc = take(data, {
|
|
401
|
-
errorCode: __expectString,
|
|
402
|
-
message: __expectString,
|
|
403
|
-
resourceId: __expectString,
|
|
404
|
-
resourceType: __expectString,
|
|
405
|
-
});
|
|
406
|
-
Object.assign(contents, doc);
|
|
407
|
-
const exception = new AccessDeniedException({
|
|
408
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
409
|
-
...contents,
|
|
410
|
-
});
|
|
411
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
412
|
-
};
|
|
413
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
414
|
-
const contents = map({});
|
|
415
|
-
const data = parsedOutput.body;
|
|
416
|
-
const doc = take(data, {
|
|
417
|
-
errorCode: __expectString,
|
|
418
|
-
message: __expectString,
|
|
419
|
-
resourceId: __expectString,
|
|
420
|
-
resourceType: __expectString,
|
|
421
|
-
});
|
|
422
|
-
Object.assign(contents, doc);
|
|
423
|
-
const exception = new ConflictException({
|
|
424
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
425
|
-
...contents,
|
|
426
|
-
});
|
|
427
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
428
|
-
};
|
|
429
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
430
|
-
const contents = map({});
|
|
431
|
-
const data = parsedOutput.body;
|
|
432
|
-
const doc = take(data, {
|
|
433
|
-
error: __expectString,
|
|
434
|
-
message: __expectString,
|
|
435
|
-
});
|
|
436
|
-
Object.assign(contents, doc);
|
|
437
|
-
const exception = new InternalServerException({
|
|
438
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
439
|
-
...contents,
|
|
440
|
-
});
|
|
441
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
442
|
-
};
|
|
443
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
444
|
-
const contents = map({});
|
|
445
|
-
const data = parsedOutput.body;
|
|
446
|
-
const doc = take(data, {
|
|
447
|
-
errorCode: __expectString,
|
|
448
|
-
message: __expectString,
|
|
449
|
-
resourceId: __expectString,
|
|
450
|
-
resourceType: __expectString,
|
|
451
|
-
});
|
|
452
|
-
Object.assign(contents, doc);
|
|
453
|
-
const exception = new ResourceNotFoundException({
|
|
454
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
455
|
-
...contents,
|
|
456
|
-
});
|
|
457
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
458
|
-
};
|
|
459
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
460
|
-
const contents = map({});
|
|
461
|
-
const data = parsedOutput.body;
|
|
462
|
-
const doc = take(data, {
|
|
463
|
-
errorCode: __expectString,
|
|
464
|
-
message: __expectString,
|
|
465
|
-
quotaCode: __expectString,
|
|
466
|
-
serviceCode: __expectString,
|
|
467
|
-
});
|
|
468
|
-
Object.assign(contents, doc);
|
|
469
|
-
const exception = new ThrottlingException({
|
|
470
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
471
|
-
...contents,
|
|
472
|
-
});
|
|
473
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
474
|
-
};
|
|
475
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
476
|
-
const contents = map({});
|
|
477
|
-
const data = parsedOutput.body;
|
|
478
|
-
const doc = take(data, {
|
|
479
|
-
errorCode: __expectString,
|
|
480
|
-
fieldList: _json,
|
|
481
|
-
message: __expectString,
|
|
482
|
-
reason: __expectString,
|
|
483
|
-
});
|
|
484
|
-
Object.assign(contents, doc);
|
|
485
|
-
const exception = new ValidationException({
|
|
486
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
487
|
-
...contents,
|
|
488
|
-
});
|
|
489
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
490
|
-
};
|
|
491
|
-
const de_AccountFindingsMetric = (output, context) => {
|
|
492
|
-
return take(output, {
|
|
493
|
-
closedFindings: (_) => de_FindingMetricsValuePerSeverity(_, context),
|
|
494
|
-
date: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
495
|
-
meanTimeToClose: (_) => de_FindingMetricsValuePerSeverity(_, context),
|
|
496
|
-
newFindings: (_) => de_FindingMetricsValuePerSeverity(_, context),
|
|
497
|
-
openFindings: (_) => de_FindingMetricsValuePerSeverity(_, context),
|
|
498
|
-
});
|
|
499
|
-
};
|
|
500
|
-
const de_Finding = (output, context) => {
|
|
501
|
-
return take(output, {
|
|
502
|
-
createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
503
|
-
description: __expectString,
|
|
504
|
-
detectorId: __expectString,
|
|
505
|
-
detectorName: __expectString,
|
|
506
|
-
detectorTags: _json,
|
|
507
|
-
generatorId: __expectString,
|
|
508
|
-
id: __expectString,
|
|
509
|
-
remediation: _json,
|
|
510
|
-
resource: _json,
|
|
511
|
-
ruleId: __expectString,
|
|
512
|
-
severity: __expectString,
|
|
513
|
-
status: __expectString,
|
|
514
|
-
title: __expectString,
|
|
515
|
-
type: __expectString,
|
|
516
|
-
updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
517
|
-
vulnerability: _json,
|
|
518
|
-
});
|
|
519
|
-
};
|
|
520
|
-
const de_FindingMetricsValuePerSeverity = (output, context) => {
|
|
521
|
-
return take(output, {
|
|
522
|
-
critical: __limitedParseDouble,
|
|
523
|
-
high: __limitedParseDouble,
|
|
524
|
-
info: __limitedParseDouble,
|
|
525
|
-
low: __limitedParseDouble,
|
|
526
|
-
medium: __limitedParseDouble,
|
|
527
|
-
});
|
|
528
|
-
};
|
|
529
|
-
const de_Findings = (output, context) => {
|
|
530
|
-
const retVal = (output || [])
|
|
531
|
-
.filter((e) => e != null)
|
|
532
|
-
.map((entry) => {
|
|
533
|
-
return de_Finding(entry, context);
|
|
534
|
-
});
|
|
535
|
-
return retVal;
|
|
536
|
-
};
|
|
537
|
-
const de_FindingsMetricList = (output, context) => {
|
|
538
|
-
const retVal = (output || [])
|
|
539
|
-
.filter((e) => e != null)
|
|
540
|
-
.map((entry) => {
|
|
541
|
-
return de_AccountFindingsMetric(entry, context);
|
|
542
|
-
});
|
|
543
|
-
return retVal;
|
|
544
|
-
};
|
|
545
|
-
const de_MetricsSummary = (output, context) => {
|
|
546
|
-
return take(output, {
|
|
547
|
-
categoriesWithMostFindings: _json,
|
|
548
|
-
date: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
549
|
-
openFindings: (_) => de_FindingMetricsValuePerSeverity(_, context),
|
|
550
|
-
scansWithMostOpenCriticalFindings: _json,
|
|
551
|
-
scansWithMostOpenFindings: _json,
|
|
552
|
-
});
|
|
553
|
-
};
|
|
554
|
-
const de_ScanSummaries = (output, context) => {
|
|
555
|
-
const retVal = (output || [])
|
|
556
|
-
.filter((e) => e != null)
|
|
557
|
-
.map((entry) => {
|
|
558
|
-
return de_ScanSummary(entry, context);
|
|
559
|
-
});
|
|
560
|
-
return retVal;
|
|
561
|
-
};
|
|
562
|
-
const de_ScanSummary = (output, context) => {
|
|
563
|
-
return take(output, {
|
|
564
|
-
createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
565
|
-
runId: __expectString,
|
|
566
|
-
scanName: __expectString,
|
|
567
|
-
scanNameArn: __expectString,
|
|
568
|
-
scanState: __expectString,
|
|
569
|
-
updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
570
|
-
});
|
|
571
|
-
};
|
|
572
|
-
const deserializeMetadata = (output) => ({
|
|
573
|
-
httpStatusCode: output.statusCode,
|
|
574
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
575
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
576
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
577
|
-
});
|
|
578
|
-
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
579
|
-
const _d = "date";
|
|
580
|
-
const _eD = "endDate";
|
|
581
|
-
const _mR = "maxResults";
|
|
582
|
-
const _nT = "nextToken";
|
|
583
|
-
const _rI = "runId";
|
|
584
|
-
const _s = "status";
|
|
585
|
-
const _sD = "startDate";
|
|
586
|
-
const _tK = "tagKeys";
|