@aws-sdk/client-inspector 3.927.0 → 3.928.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 +1243 -1407
- package/dist-cjs/runtimeConfig.shared.js +7 -0
- package/dist-es/InspectorClient.js +2 -0
- package/dist-es/commands/AddAttributesToFindingsCommand.js +3 -9
- package/dist-es/commands/CreateAssessmentTargetCommand.js +3 -9
- package/dist-es/commands/CreateAssessmentTemplateCommand.js +3 -9
- package/dist-es/commands/CreateExclusionsPreviewCommand.js +3 -9
- package/dist-es/commands/CreateResourceGroupCommand.js +3 -9
- package/dist-es/commands/DeleteAssessmentRunCommand.js +3 -9
- package/dist-es/commands/DeleteAssessmentTargetCommand.js +3 -9
- package/dist-es/commands/DeleteAssessmentTemplateCommand.js +3 -9
- package/dist-es/commands/DescribeAssessmentRunsCommand.js +3 -9
- package/dist-es/commands/DescribeAssessmentTargetsCommand.js +3 -9
- package/dist-es/commands/DescribeAssessmentTemplatesCommand.js +3 -9
- package/dist-es/commands/DescribeCrossAccountAccessRoleCommand.js +3 -9
- package/dist-es/commands/DescribeExclusionsCommand.js +3 -9
- package/dist-es/commands/DescribeFindingsCommand.js +3 -9
- package/dist-es/commands/DescribeResourceGroupsCommand.js +3 -9
- package/dist-es/commands/DescribeRulesPackagesCommand.js +3 -9
- package/dist-es/commands/GetAssessmentReportCommand.js +3 -9
- package/dist-es/commands/GetExclusionsPreviewCommand.js +3 -9
- package/dist-es/commands/GetTelemetryMetadataCommand.js +3 -9
- package/dist-es/commands/ListAssessmentRunAgentsCommand.js +3 -9
- package/dist-es/commands/ListAssessmentRunsCommand.js +3 -9
- package/dist-es/commands/ListAssessmentTargetsCommand.js +3 -9
- package/dist-es/commands/ListAssessmentTemplatesCommand.js +3 -9
- package/dist-es/commands/ListEventSubscriptionsCommand.js +3 -9
- package/dist-es/commands/ListExclusionsCommand.js +3 -9
- package/dist-es/commands/ListFindingsCommand.js +3 -9
- package/dist-es/commands/ListRulesPackagesCommand.js +3 -9
- package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
- package/dist-es/commands/PreviewAgentsCommand.js +3 -9
- package/dist-es/commands/RegisterCrossAccountAccessRoleCommand.js +3 -9
- package/dist-es/commands/RemoveAttributesFromFindingsCommand.js +3 -9
- package/dist-es/commands/SetTagsForResourceCommand.js +3 -9
- package/dist-es/commands/StartAssessmentRunCommand.js +3 -9
- package/dist-es/commands/StopAssessmentRunCommand.js +3 -9
- package/dist-es/commands/SubscribeToEventCommand.js +3 -9
- package/dist-es/commands/UnsubscribeFromEventCommand.js +3 -9
- package/dist-es/commands/UpdateAssessmentTargetCommand.js +3 -9
- package/dist-es/runtimeConfig.shared.js +7 -0
- package/dist-es/schemas/schemas_0.js +1154 -0
- package/dist-types/InspectorClient.d.ts +10 -1
- 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 +2 -5
- package/dist-types/schemas/schemas_0.d.ts +194 -0
- package/dist-types/ts3.4/InspectorClient.d.ts +4 -0
- 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 +200 -0
- package/package.json +5 -5
- package/dist-es/protocols/Aws_json1_1.js +0 -1119
- package/dist-types/protocols/Aws_json1_1.d.ts +0 -335
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +0 -449
|
@@ -1,1119 +0,0 @@
|
|
|
1
|
-
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
2
|
-
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
3
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
-
import { InspectorServiceException as __BaseException } from "../models/InspectorServiceException";
|
|
5
|
-
import { AccessDeniedException, AgentsAlreadyRunningAssessmentException, AssessmentRunInProgressException, InternalException, InvalidCrossAccountRoleException, InvalidInputException, LimitExceededException, NoSuchEntityException, PreviewGenerationInProgressException, ServiceTemporarilyUnavailableException, UnsupportedFeatureException, } from "../models/models_0";
|
|
6
|
-
export const se_AddAttributesToFindingsCommand = async (input, context) => {
|
|
7
|
-
const headers = sharedHeaders("AddAttributesToFindings");
|
|
8
|
-
let body;
|
|
9
|
-
body = JSON.stringify(_json(input));
|
|
10
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
11
|
-
};
|
|
12
|
-
export const se_CreateAssessmentTargetCommand = async (input, context) => {
|
|
13
|
-
const headers = sharedHeaders("CreateAssessmentTarget");
|
|
14
|
-
let body;
|
|
15
|
-
body = JSON.stringify(_json(input));
|
|
16
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
17
|
-
};
|
|
18
|
-
export const se_CreateAssessmentTemplateCommand = async (input, context) => {
|
|
19
|
-
const headers = sharedHeaders("CreateAssessmentTemplate");
|
|
20
|
-
let body;
|
|
21
|
-
body = JSON.stringify(_json(input));
|
|
22
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
23
|
-
};
|
|
24
|
-
export const se_CreateExclusionsPreviewCommand = async (input, context) => {
|
|
25
|
-
const headers = sharedHeaders("CreateExclusionsPreview");
|
|
26
|
-
let body;
|
|
27
|
-
body = JSON.stringify(_json(input));
|
|
28
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
29
|
-
};
|
|
30
|
-
export const se_CreateResourceGroupCommand = async (input, context) => {
|
|
31
|
-
const headers = sharedHeaders("CreateResourceGroup");
|
|
32
|
-
let body;
|
|
33
|
-
body = JSON.stringify(_json(input));
|
|
34
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
35
|
-
};
|
|
36
|
-
export const se_DeleteAssessmentRunCommand = async (input, context) => {
|
|
37
|
-
const headers = sharedHeaders("DeleteAssessmentRun");
|
|
38
|
-
let body;
|
|
39
|
-
body = JSON.stringify(_json(input));
|
|
40
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
41
|
-
};
|
|
42
|
-
export const se_DeleteAssessmentTargetCommand = async (input, context) => {
|
|
43
|
-
const headers = sharedHeaders("DeleteAssessmentTarget");
|
|
44
|
-
let body;
|
|
45
|
-
body = JSON.stringify(_json(input));
|
|
46
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
47
|
-
};
|
|
48
|
-
export const se_DeleteAssessmentTemplateCommand = async (input, context) => {
|
|
49
|
-
const headers = sharedHeaders("DeleteAssessmentTemplate");
|
|
50
|
-
let body;
|
|
51
|
-
body = JSON.stringify(_json(input));
|
|
52
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
53
|
-
};
|
|
54
|
-
export const se_DescribeAssessmentRunsCommand = async (input, context) => {
|
|
55
|
-
const headers = sharedHeaders("DescribeAssessmentRuns");
|
|
56
|
-
let body;
|
|
57
|
-
body = JSON.stringify(_json(input));
|
|
58
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
59
|
-
};
|
|
60
|
-
export const se_DescribeAssessmentTargetsCommand = async (input, context) => {
|
|
61
|
-
const headers = sharedHeaders("DescribeAssessmentTargets");
|
|
62
|
-
let body;
|
|
63
|
-
body = JSON.stringify(_json(input));
|
|
64
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
65
|
-
};
|
|
66
|
-
export const se_DescribeAssessmentTemplatesCommand = async (input, context) => {
|
|
67
|
-
const headers = sharedHeaders("DescribeAssessmentTemplates");
|
|
68
|
-
let body;
|
|
69
|
-
body = JSON.stringify(_json(input));
|
|
70
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
71
|
-
};
|
|
72
|
-
export const se_DescribeCrossAccountAccessRoleCommand = async (input, context) => {
|
|
73
|
-
const headers = sharedHeaders("DescribeCrossAccountAccessRole");
|
|
74
|
-
const body = "{}";
|
|
75
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
76
|
-
};
|
|
77
|
-
export const se_DescribeExclusionsCommand = async (input, context) => {
|
|
78
|
-
const headers = sharedHeaders("DescribeExclusions");
|
|
79
|
-
let body;
|
|
80
|
-
body = JSON.stringify(_json(input));
|
|
81
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
82
|
-
};
|
|
83
|
-
export const se_DescribeFindingsCommand = async (input, context) => {
|
|
84
|
-
const headers = sharedHeaders("DescribeFindings");
|
|
85
|
-
let body;
|
|
86
|
-
body = JSON.stringify(_json(input));
|
|
87
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
88
|
-
};
|
|
89
|
-
export const se_DescribeResourceGroupsCommand = async (input, context) => {
|
|
90
|
-
const headers = sharedHeaders("DescribeResourceGroups");
|
|
91
|
-
let body;
|
|
92
|
-
body = JSON.stringify(_json(input));
|
|
93
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
94
|
-
};
|
|
95
|
-
export const se_DescribeRulesPackagesCommand = async (input, context) => {
|
|
96
|
-
const headers = sharedHeaders("DescribeRulesPackages");
|
|
97
|
-
let body;
|
|
98
|
-
body = JSON.stringify(_json(input));
|
|
99
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
100
|
-
};
|
|
101
|
-
export const se_GetAssessmentReportCommand = async (input, context) => {
|
|
102
|
-
const headers = sharedHeaders("GetAssessmentReport");
|
|
103
|
-
let body;
|
|
104
|
-
body = JSON.stringify(_json(input));
|
|
105
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
106
|
-
};
|
|
107
|
-
export const se_GetExclusionsPreviewCommand = async (input, context) => {
|
|
108
|
-
const headers = sharedHeaders("GetExclusionsPreview");
|
|
109
|
-
let body;
|
|
110
|
-
body = JSON.stringify(_json(input));
|
|
111
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
112
|
-
};
|
|
113
|
-
export const se_GetTelemetryMetadataCommand = async (input, context) => {
|
|
114
|
-
const headers = sharedHeaders("GetTelemetryMetadata");
|
|
115
|
-
let body;
|
|
116
|
-
body = JSON.stringify(_json(input));
|
|
117
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
118
|
-
};
|
|
119
|
-
export const se_ListAssessmentRunAgentsCommand = async (input, context) => {
|
|
120
|
-
const headers = sharedHeaders("ListAssessmentRunAgents");
|
|
121
|
-
let body;
|
|
122
|
-
body = JSON.stringify(_json(input));
|
|
123
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
124
|
-
};
|
|
125
|
-
export const se_ListAssessmentRunsCommand = async (input, context) => {
|
|
126
|
-
const headers = sharedHeaders("ListAssessmentRuns");
|
|
127
|
-
let body;
|
|
128
|
-
body = JSON.stringify(se_ListAssessmentRunsRequest(input, context));
|
|
129
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
130
|
-
};
|
|
131
|
-
export const se_ListAssessmentTargetsCommand = async (input, context) => {
|
|
132
|
-
const headers = sharedHeaders("ListAssessmentTargets");
|
|
133
|
-
let body;
|
|
134
|
-
body = JSON.stringify(_json(input));
|
|
135
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
136
|
-
};
|
|
137
|
-
export const se_ListAssessmentTemplatesCommand = async (input, context) => {
|
|
138
|
-
const headers = sharedHeaders("ListAssessmentTemplates");
|
|
139
|
-
let body;
|
|
140
|
-
body = JSON.stringify(_json(input));
|
|
141
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
142
|
-
};
|
|
143
|
-
export const se_ListEventSubscriptionsCommand = async (input, context) => {
|
|
144
|
-
const headers = sharedHeaders("ListEventSubscriptions");
|
|
145
|
-
let body;
|
|
146
|
-
body = JSON.stringify(_json(input));
|
|
147
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
148
|
-
};
|
|
149
|
-
export const se_ListExclusionsCommand = async (input, context) => {
|
|
150
|
-
const headers = sharedHeaders("ListExclusions");
|
|
151
|
-
let body;
|
|
152
|
-
body = JSON.stringify(_json(input));
|
|
153
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
154
|
-
};
|
|
155
|
-
export const se_ListFindingsCommand = async (input, context) => {
|
|
156
|
-
const headers = sharedHeaders("ListFindings");
|
|
157
|
-
let body;
|
|
158
|
-
body = JSON.stringify(se_ListFindingsRequest(input, context));
|
|
159
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
160
|
-
};
|
|
161
|
-
export const se_ListRulesPackagesCommand = async (input, context) => {
|
|
162
|
-
const headers = sharedHeaders("ListRulesPackages");
|
|
163
|
-
let body;
|
|
164
|
-
body = JSON.stringify(_json(input));
|
|
165
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
166
|
-
};
|
|
167
|
-
export const se_ListTagsForResourceCommand = async (input, context) => {
|
|
168
|
-
const headers = sharedHeaders("ListTagsForResource");
|
|
169
|
-
let body;
|
|
170
|
-
body = JSON.stringify(_json(input));
|
|
171
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
172
|
-
};
|
|
173
|
-
export const se_PreviewAgentsCommand = async (input, context) => {
|
|
174
|
-
const headers = sharedHeaders("PreviewAgents");
|
|
175
|
-
let body;
|
|
176
|
-
body = JSON.stringify(_json(input));
|
|
177
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
178
|
-
};
|
|
179
|
-
export const se_RegisterCrossAccountAccessRoleCommand = async (input, context) => {
|
|
180
|
-
const headers = sharedHeaders("RegisterCrossAccountAccessRole");
|
|
181
|
-
let body;
|
|
182
|
-
body = JSON.stringify(_json(input));
|
|
183
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
184
|
-
};
|
|
185
|
-
export const se_RemoveAttributesFromFindingsCommand = async (input, context) => {
|
|
186
|
-
const headers = sharedHeaders("RemoveAttributesFromFindings");
|
|
187
|
-
let body;
|
|
188
|
-
body = JSON.stringify(_json(input));
|
|
189
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
190
|
-
};
|
|
191
|
-
export const se_SetTagsForResourceCommand = async (input, context) => {
|
|
192
|
-
const headers = sharedHeaders("SetTagsForResource");
|
|
193
|
-
let body;
|
|
194
|
-
body = JSON.stringify(_json(input));
|
|
195
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
196
|
-
};
|
|
197
|
-
export const se_StartAssessmentRunCommand = async (input, context) => {
|
|
198
|
-
const headers = sharedHeaders("StartAssessmentRun");
|
|
199
|
-
let body;
|
|
200
|
-
body = JSON.stringify(_json(input));
|
|
201
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
202
|
-
};
|
|
203
|
-
export const se_StopAssessmentRunCommand = async (input, context) => {
|
|
204
|
-
const headers = sharedHeaders("StopAssessmentRun");
|
|
205
|
-
let body;
|
|
206
|
-
body = JSON.stringify(_json(input));
|
|
207
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
208
|
-
};
|
|
209
|
-
export const se_SubscribeToEventCommand = async (input, context) => {
|
|
210
|
-
const headers = sharedHeaders("SubscribeToEvent");
|
|
211
|
-
let body;
|
|
212
|
-
body = JSON.stringify(_json(input));
|
|
213
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
214
|
-
};
|
|
215
|
-
export const se_UnsubscribeFromEventCommand = async (input, context) => {
|
|
216
|
-
const headers = sharedHeaders("UnsubscribeFromEvent");
|
|
217
|
-
let body;
|
|
218
|
-
body = JSON.stringify(_json(input));
|
|
219
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
220
|
-
};
|
|
221
|
-
export const se_UpdateAssessmentTargetCommand = async (input, context) => {
|
|
222
|
-
const headers = sharedHeaders("UpdateAssessmentTarget");
|
|
223
|
-
let body;
|
|
224
|
-
body = JSON.stringify(_json(input));
|
|
225
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
226
|
-
};
|
|
227
|
-
export const de_AddAttributesToFindingsCommand = async (output, context) => {
|
|
228
|
-
if (output.statusCode >= 300) {
|
|
229
|
-
return de_CommandError(output, context);
|
|
230
|
-
}
|
|
231
|
-
const data = await parseBody(output.body, context);
|
|
232
|
-
let contents = {};
|
|
233
|
-
contents = _json(data);
|
|
234
|
-
const response = {
|
|
235
|
-
$metadata: deserializeMetadata(output),
|
|
236
|
-
...contents,
|
|
237
|
-
};
|
|
238
|
-
return response;
|
|
239
|
-
};
|
|
240
|
-
export const de_CreateAssessmentTargetCommand = async (output, context) => {
|
|
241
|
-
if (output.statusCode >= 300) {
|
|
242
|
-
return de_CommandError(output, context);
|
|
243
|
-
}
|
|
244
|
-
const data = await parseBody(output.body, context);
|
|
245
|
-
let contents = {};
|
|
246
|
-
contents = _json(data);
|
|
247
|
-
const response = {
|
|
248
|
-
$metadata: deserializeMetadata(output),
|
|
249
|
-
...contents,
|
|
250
|
-
};
|
|
251
|
-
return response;
|
|
252
|
-
};
|
|
253
|
-
export const de_CreateAssessmentTemplateCommand = async (output, context) => {
|
|
254
|
-
if (output.statusCode >= 300) {
|
|
255
|
-
return de_CommandError(output, context);
|
|
256
|
-
}
|
|
257
|
-
const data = await parseBody(output.body, context);
|
|
258
|
-
let contents = {};
|
|
259
|
-
contents = _json(data);
|
|
260
|
-
const response = {
|
|
261
|
-
$metadata: deserializeMetadata(output),
|
|
262
|
-
...contents,
|
|
263
|
-
};
|
|
264
|
-
return response;
|
|
265
|
-
};
|
|
266
|
-
export const de_CreateExclusionsPreviewCommand = async (output, context) => {
|
|
267
|
-
if (output.statusCode >= 300) {
|
|
268
|
-
return de_CommandError(output, context);
|
|
269
|
-
}
|
|
270
|
-
const data = await parseBody(output.body, context);
|
|
271
|
-
let contents = {};
|
|
272
|
-
contents = _json(data);
|
|
273
|
-
const response = {
|
|
274
|
-
$metadata: deserializeMetadata(output),
|
|
275
|
-
...contents,
|
|
276
|
-
};
|
|
277
|
-
return response;
|
|
278
|
-
};
|
|
279
|
-
export const de_CreateResourceGroupCommand = async (output, context) => {
|
|
280
|
-
if (output.statusCode >= 300) {
|
|
281
|
-
return de_CommandError(output, context);
|
|
282
|
-
}
|
|
283
|
-
const data = await parseBody(output.body, context);
|
|
284
|
-
let contents = {};
|
|
285
|
-
contents = _json(data);
|
|
286
|
-
const response = {
|
|
287
|
-
$metadata: deserializeMetadata(output),
|
|
288
|
-
...contents,
|
|
289
|
-
};
|
|
290
|
-
return response;
|
|
291
|
-
};
|
|
292
|
-
export const de_DeleteAssessmentRunCommand = async (output, context) => {
|
|
293
|
-
if (output.statusCode >= 300) {
|
|
294
|
-
return de_CommandError(output, context);
|
|
295
|
-
}
|
|
296
|
-
await collectBody(output.body, context);
|
|
297
|
-
const response = {
|
|
298
|
-
$metadata: deserializeMetadata(output),
|
|
299
|
-
};
|
|
300
|
-
return response;
|
|
301
|
-
};
|
|
302
|
-
export const de_DeleteAssessmentTargetCommand = async (output, context) => {
|
|
303
|
-
if (output.statusCode >= 300) {
|
|
304
|
-
return de_CommandError(output, context);
|
|
305
|
-
}
|
|
306
|
-
await collectBody(output.body, context);
|
|
307
|
-
const response = {
|
|
308
|
-
$metadata: deserializeMetadata(output),
|
|
309
|
-
};
|
|
310
|
-
return response;
|
|
311
|
-
};
|
|
312
|
-
export const de_DeleteAssessmentTemplateCommand = async (output, context) => {
|
|
313
|
-
if (output.statusCode >= 300) {
|
|
314
|
-
return de_CommandError(output, context);
|
|
315
|
-
}
|
|
316
|
-
await collectBody(output.body, context);
|
|
317
|
-
const response = {
|
|
318
|
-
$metadata: deserializeMetadata(output),
|
|
319
|
-
};
|
|
320
|
-
return response;
|
|
321
|
-
};
|
|
322
|
-
export const de_DescribeAssessmentRunsCommand = async (output, context) => {
|
|
323
|
-
if (output.statusCode >= 300) {
|
|
324
|
-
return de_CommandError(output, context);
|
|
325
|
-
}
|
|
326
|
-
const data = await parseBody(output.body, context);
|
|
327
|
-
let contents = {};
|
|
328
|
-
contents = de_DescribeAssessmentRunsResponse(data, context);
|
|
329
|
-
const response = {
|
|
330
|
-
$metadata: deserializeMetadata(output),
|
|
331
|
-
...contents,
|
|
332
|
-
};
|
|
333
|
-
return response;
|
|
334
|
-
};
|
|
335
|
-
export const de_DescribeAssessmentTargetsCommand = async (output, context) => {
|
|
336
|
-
if (output.statusCode >= 300) {
|
|
337
|
-
return de_CommandError(output, context);
|
|
338
|
-
}
|
|
339
|
-
const data = await parseBody(output.body, context);
|
|
340
|
-
let contents = {};
|
|
341
|
-
contents = de_DescribeAssessmentTargetsResponse(data, context);
|
|
342
|
-
const response = {
|
|
343
|
-
$metadata: deserializeMetadata(output),
|
|
344
|
-
...contents,
|
|
345
|
-
};
|
|
346
|
-
return response;
|
|
347
|
-
};
|
|
348
|
-
export const de_DescribeAssessmentTemplatesCommand = async (output, context) => {
|
|
349
|
-
if (output.statusCode >= 300) {
|
|
350
|
-
return de_CommandError(output, context);
|
|
351
|
-
}
|
|
352
|
-
const data = await parseBody(output.body, context);
|
|
353
|
-
let contents = {};
|
|
354
|
-
contents = de_DescribeAssessmentTemplatesResponse(data, context);
|
|
355
|
-
const response = {
|
|
356
|
-
$metadata: deserializeMetadata(output),
|
|
357
|
-
...contents,
|
|
358
|
-
};
|
|
359
|
-
return response;
|
|
360
|
-
};
|
|
361
|
-
export const de_DescribeCrossAccountAccessRoleCommand = async (output, context) => {
|
|
362
|
-
if (output.statusCode >= 300) {
|
|
363
|
-
return de_CommandError(output, context);
|
|
364
|
-
}
|
|
365
|
-
const data = await parseBody(output.body, context);
|
|
366
|
-
let contents = {};
|
|
367
|
-
contents = de_DescribeCrossAccountAccessRoleResponse(data, context);
|
|
368
|
-
const response = {
|
|
369
|
-
$metadata: deserializeMetadata(output),
|
|
370
|
-
...contents,
|
|
371
|
-
};
|
|
372
|
-
return response;
|
|
373
|
-
};
|
|
374
|
-
export const de_DescribeExclusionsCommand = async (output, context) => {
|
|
375
|
-
if (output.statusCode >= 300) {
|
|
376
|
-
return de_CommandError(output, context);
|
|
377
|
-
}
|
|
378
|
-
const data = await parseBody(output.body, context);
|
|
379
|
-
let contents = {};
|
|
380
|
-
contents = _json(data);
|
|
381
|
-
const response = {
|
|
382
|
-
$metadata: deserializeMetadata(output),
|
|
383
|
-
...contents,
|
|
384
|
-
};
|
|
385
|
-
return response;
|
|
386
|
-
};
|
|
387
|
-
export const de_DescribeFindingsCommand = async (output, context) => {
|
|
388
|
-
if (output.statusCode >= 300) {
|
|
389
|
-
return de_CommandError(output, context);
|
|
390
|
-
}
|
|
391
|
-
const data = await parseBody(output.body, context);
|
|
392
|
-
let contents = {};
|
|
393
|
-
contents = de_DescribeFindingsResponse(data, context);
|
|
394
|
-
const response = {
|
|
395
|
-
$metadata: deserializeMetadata(output),
|
|
396
|
-
...contents,
|
|
397
|
-
};
|
|
398
|
-
return response;
|
|
399
|
-
};
|
|
400
|
-
export const de_DescribeResourceGroupsCommand = async (output, context) => {
|
|
401
|
-
if (output.statusCode >= 300) {
|
|
402
|
-
return de_CommandError(output, context);
|
|
403
|
-
}
|
|
404
|
-
const data = await parseBody(output.body, context);
|
|
405
|
-
let contents = {};
|
|
406
|
-
contents = de_DescribeResourceGroupsResponse(data, context);
|
|
407
|
-
const response = {
|
|
408
|
-
$metadata: deserializeMetadata(output),
|
|
409
|
-
...contents,
|
|
410
|
-
};
|
|
411
|
-
return response;
|
|
412
|
-
};
|
|
413
|
-
export const de_DescribeRulesPackagesCommand = async (output, context) => {
|
|
414
|
-
if (output.statusCode >= 300) {
|
|
415
|
-
return de_CommandError(output, context);
|
|
416
|
-
}
|
|
417
|
-
const data = await parseBody(output.body, context);
|
|
418
|
-
let contents = {};
|
|
419
|
-
contents = _json(data);
|
|
420
|
-
const response = {
|
|
421
|
-
$metadata: deserializeMetadata(output),
|
|
422
|
-
...contents,
|
|
423
|
-
};
|
|
424
|
-
return response;
|
|
425
|
-
};
|
|
426
|
-
export const de_GetAssessmentReportCommand = async (output, context) => {
|
|
427
|
-
if (output.statusCode >= 300) {
|
|
428
|
-
return de_CommandError(output, context);
|
|
429
|
-
}
|
|
430
|
-
const data = await parseBody(output.body, context);
|
|
431
|
-
let contents = {};
|
|
432
|
-
contents = _json(data);
|
|
433
|
-
const response = {
|
|
434
|
-
$metadata: deserializeMetadata(output),
|
|
435
|
-
...contents,
|
|
436
|
-
};
|
|
437
|
-
return response;
|
|
438
|
-
};
|
|
439
|
-
export const de_GetExclusionsPreviewCommand = async (output, context) => {
|
|
440
|
-
if (output.statusCode >= 300) {
|
|
441
|
-
return de_CommandError(output, context);
|
|
442
|
-
}
|
|
443
|
-
const data = await parseBody(output.body, context);
|
|
444
|
-
let contents = {};
|
|
445
|
-
contents = _json(data);
|
|
446
|
-
const response = {
|
|
447
|
-
$metadata: deserializeMetadata(output),
|
|
448
|
-
...contents,
|
|
449
|
-
};
|
|
450
|
-
return response;
|
|
451
|
-
};
|
|
452
|
-
export const de_GetTelemetryMetadataCommand = async (output, context) => {
|
|
453
|
-
if (output.statusCode >= 300) {
|
|
454
|
-
return de_CommandError(output, context);
|
|
455
|
-
}
|
|
456
|
-
const data = await parseBody(output.body, context);
|
|
457
|
-
let contents = {};
|
|
458
|
-
contents = _json(data);
|
|
459
|
-
const response = {
|
|
460
|
-
$metadata: deserializeMetadata(output),
|
|
461
|
-
...contents,
|
|
462
|
-
};
|
|
463
|
-
return response;
|
|
464
|
-
};
|
|
465
|
-
export const de_ListAssessmentRunAgentsCommand = async (output, context) => {
|
|
466
|
-
if (output.statusCode >= 300) {
|
|
467
|
-
return de_CommandError(output, context);
|
|
468
|
-
}
|
|
469
|
-
const data = await parseBody(output.body, context);
|
|
470
|
-
let contents = {};
|
|
471
|
-
contents = _json(data);
|
|
472
|
-
const response = {
|
|
473
|
-
$metadata: deserializeMetadata(output),
|
|
474
|
-
...contents,
|
|
475
|
-
};
|
|
476
|
-
return response;
|
|
477
|
-
};
|
|
478
|
-
export const de_ListAssessmentRunsCommand = async (output, context) => {
|
|
479
|
-
if (output.statusCode >= 300) {
|
|
480
|
-
return de_CommandError(output, context);
|
|
481
|
-
}
|
|
482
|
-
const data = await parseBody(output.body, context);
|
|
483
|
-
let contents = {};
|
|
484
|
-
contents = _json(data);
|
|
485
|
-
const response = {
|
|
486
|
-
$metadata: deserializeMetadata(output),
|
|
487
|
-
...contents,
|
|
488
|
-
};
|
|
489
|
-
return response;
|
|
490
|
-
};
|
|
491
|
-
export const de_ListAssessmentTargetsCommand = async (output, context) => {
|
|
492
|
-
if (output.statusCode >= 300) {
|
|
493
|
-
return de_CommandError(output, context);
|
|
494
|
-
}
|
|
495
|
-
const data = await parseBody(output.body, context);
|
|
496
|
-
let contents = {};
|
|
497
|
-
contents = _json(data);
|
|
498
|
-
const response = {
|
|
499
|
-
$metadata: deserializeMetadata(output),
|
|
500
|
-
...contents,
|
|
501
|
-
};
|
|
502
|
-
return response;
|
|
503
|
-
};
|
|
504
|
-
export const de_ListAssessmentTemplatesCommand = async (output, context) => {
|
|
505
|
-
if (output.statusCode >= 300) {
|
|
506
|
-
return de_CommandError(output, context);
|
|
507
|
-
}
|
|
508
|
-
const data = await parseBody(output.body, context);
|
|
509
|
-
let contents = {};
|
|
510
|
-
contents = _json(data);
|
|
511
|
-
const response = {
|
|
512
|
-
$metadata: deserializeMetadata(output),
|
|
513
|
-
...contents,
|
|
514
|
-
};
|
|
515
|
-
return response;
|
|
516
|
-
};
|
|
517
|
-
export const de_ListEventSubscriptionsCommand = async (output, context) => {
|
|
518
|
-
if (output.statusCode >= 300) {
|
|
519
|
-
return de_CommandError(output, context);
|
|
520
|
-
}
|
|
521
|
-
const data = await parseBody(output.body, context);
|
|
522
|
-
let contents = {};
|
|
523
|
-
contents = de_ListEventSubscriptionsResponse(data, context);
|
|
524
|
-
const response = {
|
|
525
|
-
$metadata: deserializeMetadata(output),
|
|
526
|
-
...contents,
|
|
527
|
-
};
|
|
528
|
-
return response;
|
|
529
|
-
};
|
|
530
|
-
export const de_ListExclusionsCommand = async (output, context) => {
|
|
531
|
-
if (output.statusCode >= 300) {
|
|
532
|
-
return de_CommandError(output, context);
|
|
533
|
-
}
|
|
534
|
-
const data = await parseBody(output.body, context);
|
|
535
|
-
let contents = {};
|
|
536
|
-
contents = _json(data);
|
|
537
|
-
const response = {
|
|
538
|
-
$metadata: deserializeMetadata(output),
|
|
539
|
-
...contents,
|
|
540
|
-
};
|
|
541
|
-
return response;
|
|
542
|
-
};
|
|
543
|
-
export const de_ListFindingsCommand = async (output, context) => {
|
|
544
|
-
if (output.statusCode >= 300) {
|
|
545
|
-
return de_CommandError(output, context);
|
|
546
|
-
}
|
|
547
|
-
const data = await parseBody(output.body, context);
|
|
548
|
-
let contents = {};
|
|
549
|
-
contents = _json(data);
|
|
550
|
-
const response = {
|
|
551
|
-
$metadata: deserializeMetadata(output),
|
|
552
|
-
...contents,
|
|
553
|
-
};
|
|
554
|
-
return response;
|
|
555
|
-
};
|
|
556
|
-
export const de_ListRulesPackagesCommand = async (output, context) => {
|
|
557
|
-
if (output.statusCode >= 300) {
|
|
558
|
-
return de_CommandError(output, context);
|
|
559
|
-
}
|
|
560
|
-
const data = await parseBody(output.body, context);
|
|
561
|
-
let contents = {};
|
|
562
|
-
contents = _json(data);
|
|
563
|
-
const response = {
|
|
564
|
-
$metadata: deserializeMetadata(output),
|
|
565
|
-
...contents,
|
|
566
|
-
};
|
|
567
|
-
return response;
|
|
568
|
-
};
|
|
569
|
-
export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
570
|
-
if (output.statusCode >= 300) {
|
|
571
|
-
return de_CommandError(output, context);
|
|
572
|
-
}
|
|
573
|
-
const data = await parseBody(output.body, context);
|
|
574
|
-
let contents = {};
|
|
575
|
-
contents = _json(data);
|
|
576
|
-
const response = {
|
|
577
|
-
$metadata: deserializeMetadata(output),
|
|
578
|
-
...contents,
|
|
579
|
-
};
|
|
580
|
-
return response;
|
|
581
|
-
};
|
|
582
|
-
export const de_PreviewAgentsCommand = async (output, context) => {
|
|
583
|
-
if (output.statusCode >= 300) {
|
|
584
|
-
return de_CommandError(output, context);
|
|
585
|
-
}
|
|
586
|
-
const data = await parseBody(output.body, context);
|
|
587
|
-
let contents = {};
|
|
588
|
-
contents = _json(data);
|
|
589
|
-
const response = {
|
|
590
|
-
$metadata: deserializeMetadata(output),
|
|
591
|
-
...contents,
|
|
592
|
-
};
|
|
593
|
-
return response;
|
|
594
|
-
};
|
|
595
|
-
export const de_RegisterCrossAccountAccessRoleCommand = async (output, context) => {
|
|
596
|
-
if (output.statusCode >= 300) {
|
|
597
|
-
return de_CommandError(output, context);
|
|
598
|
-
}
|
|
599
|
-
await collectBody(output.body, context);
|
|
600
|
-
const response = {
|
|
601
|
-
$metadata: deserializeMetadata(output),
|
|
602
|
-
};
|
|
603
|
-
return response;
|
|
604
|
-
};
|
|
605
|
-
export const de_RemoveAttributesFromFindingsCommand = async (output, context) => {
|
|
606
|
-
if (output.statusCode >= 300) {
|
|
607
|
-
return de_CommandError(output, context);
|
|
608
|
-
}
|
|
609
|
-
const data = await parseBody(output.body, context);
|
|
610
|
-
let contents = {};
|
|
611
|
-
contents = _json(data);
|
|
612
|
-
const response = {
|
|
613
|
-
$metadata: deserializeMetadata(output),
|
|
614
|
-
...contents,
|
|
615
|
-
};
|
|
616
|
-
return response;
|
|
617
|
-
};
|
|
618
|
-
export const de_SetTagsForResourceCommand = async (output, context) => {
|
|
619
|
-
if (output.statusCode >= 300) {
|
|
620
|
-
return de_CommandError(output, context);
|
|
621
|
-
}
|
|
622
|
-
await collectBody(output.body, context);
|
|
623
|
-
const response = {
|
|
624
|
-
$metadata: deserializeMetadata(output),
|
|
625
|
-
};
|
|
626
|
-
return response;
|
|
627
|
-
};
|
|
628
|
-
export const de_StartAssessmentRunCommand = async (output, context) => {
|
|
629
|
-
if (output.statusCode >= 300) {
|
|
630
|
-
return de_CommandError(output, context);
|
|
631
|
-
}
|
|
632
|
-
const data = await parseBody(output.body, context);
|
|
633
|
-
let contents = {};
|
|
634
|
-
contents = _json(data);
|
|
635
|
-
const response = {
|
|
636
|
-
$metadata: deserializeMetadata(output),
|
|
637
|
-
...contents,
|
|
638
|
-
};
|
|
639
|
-
return response;
|
|
640
|
-
};
|
|
641
|
-
export const de_StopAssessmentRunCommand = async (output, context) => {
|
|
642
|
-
if (output.statusCode >= 300) {
|
|
643
|
-
return de_CommandError(output, context);
|
|
644
|
-
}
|
|
645
|
-
await collectBody(output.body, context);
|
|
646
|
-
const response = {
|
|
647
|
-
$metadata: deserializeMetadata(output),
|
|
648
|
-
};
|
|
649
|
-
return response;
|
|
650
|
-
};
|
|
651
|
-
export const de_SubscribeToEventCommand = async (output, context) => {
|
|
652
|
-
if (output.statusCode >= 300) {
|
|
653
|
-
return de_CommandError(output, context);
|
|
654
|
-
}
|
|
655
|
-
await collectBody(output.body, context);
|
|
656
|
-
const response = {
|
|
657
|
-
$metadata: deserializeMetadata(output),
|
|
658
|
-
};
|
|
659
|
-
return response;
|
|
660
|
-
};
|
|
661
|
-
export const de_UnsubscribeFromEventCommand = async (output, context) => {
|
|
662
|
-
if (output.statusCode >= 300) {
|
|
663
|
-
return de_CommandError(output, context);
|
|
664
|
-
}
|
|
665
|
-
await collectBody(output.body, context);
|
|
666
|
-
const response = {
|
|
667
|
-
$metadata: deserializeMetadata(output),
|
|
668
|
-
};
|
|
669
|
-
return response;
|
|
670
|
-
};
|
|
671
|
-
export const de_UpdateAssessmentTargetCommand = async (output, context) => {
|
|
672
|
-
if (output.statusCode >= 300) {
|
|
673
|
-
return de_CommandError(output, context);
|
|
674
|
-
}
|
|
675
|
-
await collectBody(output.body, context);
|
|
676
|
-
const response = {
|
|
677
|
-
$metadata: deserializeMetadata(output),
|
|
678
|
-
};
|
|
679
|
-
return response;
|
|
680
|
-
};
|
|
681
|
-
const de_CommandError = async (output, context) => {
|
|
682
|
-
const parsedOutput = {
|
|
683
|
-
...output,
|
|
684
|
-
body: await parseErrorBody(output.body, context),
|
|
685
|
-
};
|
|
686
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
687
|
-
switch (errorCode) {
|
|
688
|
-
case "AccessDeniedException":
|
|
689
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
690
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
691
|
-
case "InternalException":
|
|
692
|
-
case "com.amazonaws.inspector#InternalException":
|
|
693
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
694
|
-
case "InvalidInputException":
|
|
695
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
696
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
697
|
-
case "NoSuchEntityException":
|
|
698
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
699
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
700
|
-
case "ServiceTemporarilyUnavailableException":
|
|
701
|
-
case "com.amazonaws.inspector#ServiceTemporarilyUnavailableException":
|
|
702
|
-
throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context);
|
|
703
|
-
case "InvalidCrossAccountRoleException":
|
|
704
|
-
case "com.amazonaws.inspector#InvalidCrossAccountRoleException":
|
|
705
|
-
throw await de_InvalidCrossAccountRoleExceptionRes(parsedOutput, context);
|
|
706
|
-
case "LimitExceededException":
|
|
707
|
-
case "com.amazonaws.inspector#LimitExceededException":
|
|
708
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
709
|
-
case "PreviewGenerationInProgressException":
|
|
710
|
-
case "com.amazonaws.inspector#PreviewGenerationInProgressException":
|
|
711
|
-
throw await de_PreviewGenerationInProgressExceptionRes(parsedOutput, context);
|
|
712
|
-
case "AssessmentRunInProgressException":
|
|
713
|
-
case "com.amazonaws.inspector#AssessmentRunInProgressException":
|
|
714
|
-
throw await de_AssessmentRunInProgressExceptionRes(parsedOutput, context);
|
|
715
|
-
case "UnsupportedFeatureException":
|
|
716
|
-
case "com.amazonaws.inspector#UnsupportedFeatureException":
|
|
717
|
-
throw await de_UnsupportedFeatureExceptionRes(parsedOutput, context);
|
|
718
|
-
case "AgentsAlreadyRunningAssessmentException":
|
|
719
|
-
case "com.amazonaws.inspector#AgentsAlreadyRunningAssessmentException":
|
|
720
|
-
throw await de_AgentsAlreadyRunningAssessmentExceptionRes(parsedOutput, context);
|
|
721
|
-
default:
|
|
722
|
-
const parsedBody = parsedOutput.body;
|
|
723
|
-
return throwDefaultError({
|
|
724
|
-
output,
|
|
725
|
-
parsedBody,
|
|
726
|
-
errorCode,
|
|
727
|
-
});
|
|
728
|
-
}
|
|
729
|
-
};
|
|
730
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
731
|
-
const body = parsedOutput.body;
|
|
732
|
-
const deserialized = _json(body);
|
|
733
|
-
const exception = new AccessDeniedException({
|
|
734
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
735
|
-
...deserialized,
|
|
736
|
-
});
|
|
737
|
-
return __decorateServiceException(exception, body);
|
|
738
|
-
};
|
|
739
|
-
const de_AgentsAlreadyRunningAssessmentExceptionRes = async (parsedOutput, context) => {
|
|
740
|
-
const body = parsedOutput.body;
|
|
741
|
-
const deserialized = _json(body);
|
|
742
|
-
const exception = new AgentsAlreadyRunningAssessmentException({
|
|
743
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
744
|
-
...deserialized,
|
|
745
|
-
});
|
|
746
|
-
return __decorateServiceException(exception, body);
|
|
747
|
-
};
|
|
748
|
-
const de_AssessmentRunInProgressExceptionRes = async (parsedOutput, context) => {
|
|
749
|
-
const body = parsedOutput.body;
|
|
750
|
-
const deserialized = _json(body);
|
|
751
|
-
const exception = new AssessmentRunInProgressException({
|
|
752
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
753
|
-
...deserialized,
|
|
754
|
-
});
|
|
755
|
-
return __decorateServiceException(exception, body);
|
|
756
|
-
};
|
|
757
|
-
const de_InternalExceptionRes = async (parsedOutput, context) => {
|
|
758
|
-
const body = parsedOutput.body;
|
|
759
|
-
const deserialized = _json(body);
|
|
760
|
-
const exception = new InternalException({
|
|
761
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
762
|
-
...deserialized,
|
|
763
|
-
});
|
|
764
|
-
return __decorateServiceException(exception, body);
|
|
765
|
-
};
|
|
766
|
-
const de_InvalidCrossAccountRoleExceptionRes = async (parsedOutput, context) => {
|
|
767
|
-
const body = parsedOutput.body;
|
|
768
|
-
const deserialized = _json(body);
|
|
769
|
-
const exception = new InvalidCrossAccountRoleException({
|
|
770
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
771
|
-
...deserialized,
|
|
772
|
-
});
|
|
773
|
-
return __decorateServiceException(exception, body);
|
|
774
|
-
};
|
|
775
|
-
const de_InvalidInputExceptionRes = async (parsedOutput, context) => {
|
|
776
|
-
const body = parsedOutput.body;
|
|
777
|
-
const deserialized = _json(body);
|
|
778
|
-
const exception = new InvalidInputException({
|
|
779
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
780
|
-
...deserialized,
|
|
781
|
-
});
|
|
782
|
-
return __decorateServiceException(exception, body);
|
|
783
|
-
};
|
|
784
|
-
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
785
|
-
const body = parsedOutput.body;
|
|
786
|
-
const deserialized = _json(body);
|
|
787
|
-
const exception = new LimitExceededException({
|
|
788
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
789
|
-
...deserialized,
|
|
790
|
-
});
|
|
791
|
-
return __decorateServiceException(exception, body);
|
|
792
|
-
};
|
|
793
|
-
const de_NoSuchEntityExceptionRes = async (parsedOutput, context) => {
|
|
794
|
-
const body = parsedOutput.body;
|
|
795
|
-
const deserialized = _json(body);
|
|
796
|
-
const exception = new NoSuchEntityException({
|
|
797
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
798
|
-
...deserialized,
|
|
799
|
-
});
|
|
800
|
-
return __decorateServiceException(exception, body);
|
|
801
|
-
};
|
|
802
|
-
const de_PreviewGenerationInProgressExceptionRes = async (parsedOutput, context) => {
|
|
803
|
-
const body = parsedOutput.body;
|
|
804
|
-
const deserialized = _json(body);
|
|
805
|
-
const exception = new PreviewGenerationInProgressException({
|
|
806
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
807
|
-
...deserialized,
|
|
808
|
-
});
|
|
809
|
-
return __decorateServiceException(exception, body);
|
|
810
|
-
};
|
|
811
|
-
const de_ServiceTemporarilyUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
812
|
-
const body = parsedOutput.body;
|
|
813
|
-
const deserialized = _json(body);
|
|
814
|
-
const exception = new ServiceTemporarilyUnavailableException({
|
|
815
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
816
|
-
...deserialized,
|
|
817
|
-
});
|
|
818
|
-
return __decorateServiceException(exception, body);
|
|
819
|
-
};
|
|
820
|
-
const de_UnsupportedFeatureExceptionRes = async (parsedOutput, context) => {
|
|
821
|
-
const body = parsedOutput.body;
|
|
822
|
-
const deserialized = _json(body);
|
|
823
|
-
const exception = new UnsupportedFeatureException({
|
|
824
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
825
|
-
...deserialized,
|
|
826
|
-
});
|
|
827
|
-
return __decorateServiceException(exception, body);
|
|
828
|
-
};
|
|
829
|
-
const se_AssessmentRunFilter = (input, context) => {
|
|
830
|
-
return take(input, {
|
|
831
|
-
completionTimeRange: (_) => se_TimestampRange(_, context),
|
|
832
|
-
durationRange: _json,
|
|
833
|
-
namePattern: [],
|
|
834
|
-
rulesPackageArns: _json,
|
|
835
|
-
startTimeRange: (_) => se_TimestampRange(_, context),
|
|
836
|
-
stateChangeTimeRange: (_) => se_TimestampRange(_, context),
|
|
837
|
-
states: _json,
|
|
838
|
-
});
|
|
839
|
-
};
|
|
840
|
-
const se_FindingFilter = (input, context) => {
|
|
841
|
-
return take(input, {
|
|
842
|
-
agentIds: _json,
|
|
843
|
-
attributes: _json,
|
|
844
|
-
autoScalingGroups: _json,
|
|
845
|
-
creationTimeRange: (_) => se_TimestampRange(_, context),
|
|
846
|
-
ruleNames: _json,
|
|
847
|
-
rulesPackageArns: _json,
|
|
848
|
-
severities: _json,
|
|
849
|
-
userAttributes: _json,
|
|
850
|
-
});
|
|
851
|
-
};
|
|
852
|
-
const se_ListAssessmentRunsRequest = (input, context) => {
|
|
853
|
-
return take(input, {
|
|
854
|
-
assessmentTemplateArns: _json,
|
|
855
|
-
filter: (_) => se_AssessmentRunFilter(_, context),
|
|
856
|
-
maxResults: [],
|
|
857
|
-
nextToken: [],
|
|
858
|
-
});
|
|
859
|
-
};
|
|
860
|
-
const se_ListFindingsRequest = (input, context) => {
|
|
861
|
-
return take(input, {
|
|
862
|
-
assessmentRunArns: _json,
|
|
863
|
-
filter: (_) => se_FindingFilter(_, context),
|
|
864
|
-
maxResults: [],
|
|
865
|
-
nextToken: [],
|
|
866
|
-
});
|
|
867
|
-
};
|
|
868
|
-
const se_TimestampRange = (input, context) => {
|
|
869
|
-
return take(input, {
|
|
870
|
-
beginDate: (_) => _.getTime() / 1_000,
|
|
871
|
-
endDate: (_) => _.getTime() / 1_000,
|
|
872
|
-
});
|
|
873
|
-
};
|
|
874
|
-
const de_AssessmentRun = (output, context) => {
|
|
875
|
-
return take(output, {
|
|
876
|
-
arn: __expectString,
|
|
877
|
-
assessmentTemplateArn: __expectString,
|
|
878
|
-
completedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
879
|
-
createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
880
|
-
dataCollected: __expectBoolean,
|
|
881
|
-
durationInSeconds: __expectInt32,
|
|
882
|
-
findingCounts: _json,
|
|
883
|
-
name: __expectString,
|
|
884
|
-
notifications: (_) => de_AssessmentRunNotificationList(_, context),
|
|
885
|
-
rulesPackageArns: _json,
|
|
886
|
-
startedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
887
|
-
state: __expectString,
|
|
888
|
-
stateChangedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
889
|
-
stateChanges: (_) => de_AssessmentRunStateChangeList(_, context),
|
|
890
|
-
userAttributesForFindings: _json,
|
|
891
|
-
});
|
|
892
|
-
};
|
|
893
|
-
const de_AssessmentRunList = (output, context) => {
|
|
894
|
-
const retVal = (output || [])
|
|
895
|
-
.filter((e) => e != null)
|
|
896
|
-
.map((entry) => {
|
|
897
|
-
return de_AssessmentRun(entry, context);
|
|
898
|
-
});
|
|
899
|
-
return retVal;
|
|
900
|
-
};
|
|
901
|
-
const de_AssessmentRunNotification = (output, context) => {
|
|
902
|
-
return take(output, {
|
|
903
|
-
date: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
904
|
-
error: __expectBoolean,
|
|
905
|
-
event: __expectString,
|
|
906
|
-
message: __expectString,
|
|
907
|
-
snsPublishStatusCode: __expectString,
|
|
908
|
-
snsTopicArn: __expectString,
|
|
909
|
-
});
|
|
910
|
-
};
|
|
911
|
-
const de_AssessmentRunNotificationList = (output, context) => {
|
|
912
|
-
const retVal = (output || [])
|
|
913
|
-
.filter((e) => e != null)
|
|
914
|
-
.map((entry) => {
|
|
915
|
-
return de_AssessmentRunNotification(entry, context);
|
|
916
|
-
});
|
|
917
|
-
return retVal;
|
|
918
|
-
};
|
|
919
|
-
const de_AssessmentRunStateChange = (output, context) => {
|
|
920
|
-
return take(output, {
|
|
921
|
-
state: __expectString,
|
|
922
|
-
stateChangedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
923
|
-
});
|
|
924
|
-
};
|
|
925
|
-
const de_AssessmentRunStateChangeList = (output, context) => {
|
|
926
|
-
const retVal = (output || [])
|
|
927
|
-
.filter((e) => e != null)
|
|
928
|
-
.map((entry) => {
|
|
929
|
-
return de_AssessmentRunStateChange(entry, context);
|
|
930
|
-
});
|
|
931
|
-
return retVal;
|
|
932
|
-
};
|
|
933
|
-
const de_AssessmentTarget = (output, context) => {
|
|
934
|
-
return take(output, {
|
|
935
|
-
arn: __expectString,
|
|
936
|
-
createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
937
|
-
name: __expectString,
|
|
938
|
-
resourceGroupArn: __expectString,
|
|
939
|
-
updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
940
|
-
});
|
|
941
|
-
};
|
|
942
|
-
const de_AssessmentTargetList = (output, context) => {
|
|
943
|
-
const retVal = (output || [])
|
|
944
|
-
.filter((e) => e != null)
|
|
945
|
-
.map((entry) => {
|
|
946
|
-
return de_AssessmentTarget(entry, context);
|
|
947
|
-
});
|
|
948
|
-
return retVal;
|
|
949
|
-
};
|
|
950
|
-
const de_AssessmentTemplate = (output, context) => {
|
|
951
|
-
return take(output, {
|
|
952
|
-
arn: __expectString,
|
|
953
|
-
assessmentRunCount: __expectInt32,
|
|
954
|
-
assessmentTargetArn: __expectString,
|
|
955
|
-
createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
956
|
-
durationInSeconds: __expectInt32,
|
|
957
|
-
lastAssessmentRunArn: __expectString,
|
|
958
|
-
name: __expectString,
|
|
959
|
-
rulesPackageArns: _json,
|
|
960
|
-
userAttributesForFindings: _json,
|
|
961
|
-
});
|
|
962
|
-
};
|
|
963
|
-
const de_AssessmentTemplateList = (output, context) => {
|
|
964
|
-
const retVal = (output || [])
|
|
965
|
-
.filter((e) => e != null)
|
|
966
|
-
.map((entry) => {
|
|
967
|
-
return de_AssessmentTemplate(entry, context);
|
|
968
|
-
});
|
|
969
|
-
return retVal;
|
|
970
|
-
};
|
|
971
|
-
const de_DescribeAssessmentRunsResponse = (output, context) => {
|
|
972
|
-
return take(output, {
|
|
973
|
-
assessmentRuns: (_) => de_AssessmentRunList(_, context),
|
|
974
|
-
failedItems: _json,
|
|
975
|
-
});
|
|
976
|
-
};
|
|
977
|
-
const de_DescribeAssessmentTargetsResponse = (output, context) => {
|
|
978
|
-
return take(output, {
|
|
979
|
-
assessmentTargets: (_) => de_AssessmentTargetList(_, context),
|
|
980
|
-
failedItems: _json,
|
|
981
|
-
});
|
|
982
|
-
};
|
|
983
|
-
const de_DescribeAssessmentTemplatesResponse = (output, context) => {
|
|
984
|
-
return take(output, {
|
|
985
|
-
assessmentTemplates: (_) => de_AssessmentTemplateList(_, context),
|
|
986
|
-
failedItems: _json,
|
|
987
|
-
});
|
|
988
|
-
};
|
|
989
|
-
const de_DescribeCrossAccountAccessRoleResponse = (output, context) => {
|
|
990
|
-
return take(output, {
|
|
991
|
-
registeredAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
992
|
-
roleArn: __expectString,
|
|
993
|
-
valid: __expectBoolean,
|
|
994
|
-
});
|
|
995
|
-
};
|
|
996
|
-
const de_DescribeFindingsResponse = (output, context) => {
|
|
997
|
-
return take(output, {
|
|
998
|
-
failedItems: _json,
|
|
999
|
-
findings: (_) => de_FindingList(_, context),
|
|
1000
|
-
});
|
|
1001
|
-
};
|
|
1002
|
-
const de_DescribeResourceGroupsResponse = (output, context) => {
|
|
1003
|
-
return take(output, {
|
|
1004
|
-
failedItems: _json,
|
|
1005
|
-
resourceGroups: (_) => de_ResourceGroupList(_, context),
|
|
1006
|
-
});
|
|
1007
|
-
};
|
|
1008
|
-
const de_EventSubscription = (output, context) => {
|
|
1009
|
-
return take(output, {
|
|
1010
|
-
event: __expectString,
|
|
1011
|
-
subscribedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1012
|
-
});
|
|
1013
|
-
};
|
|
1014
|
-
const de_EventSubscriptionList = (output, context) => {
|
|
1015
|
-
const retVal = (output || [])
|
|
1016
|
-
.filter((e) => e != null)
|
|
1017
|
-
.map((entry) => {
|
|
1018
|
-
return de_EventSubscription(entry, context);
|
|
1019
|
-
});
|
|
1020
|
-
return retVal;
|
|
1021
|
-
};
|
|
1022
|
-
const de_Finding = (output, context) => {
|
|
1023
|
-
return take(output, {
|
|
1024
|
-
arn: __expectString,
|
|
1025
|
-
assetAttributes: _json,
|
|
1026
|
-
assetType: __expectString,
|
|
1027
|
-
attributes: _json,
|
|
1028
|
-
confidence: __expectInt32,
|
|
1029
|
-
createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1030
|
-
description: __expectString,
|
|
1031
|
-
id: __expectString,
|
|
1032
|
-
indicatorOfCompromise: __expectBoolean,
|
|
1033
|
-
numericSeverity: __limitedParseDouble,
|
|
1034
|
-
recommendation: __expectString,
|
|
1035
|
-
schemaVersion: __expectInt32,
|
|
1036
|
-
service: __expectString,
|
|
1037
|
-
serviceAttributes: _json,
|
|
1038
|
-
severity: __expectString,
|
|
1039
|
-
title: __expectString,
|
|
1040
|
-
updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1041
|
-
userAttributes: _json,
|
|
1042
|
-
});
|
|
1043
|
-
};
|
|
1044
|
-
const de_FindingList = (output, context) => {
|
|
1045
|
-
const retVal = (output || [])
|
|
1046
|
-
.filter((e) => e != null)
|
|
1047
|
-
.map((entry) => {
|
|
1048
|
-
return de_Finding(entry, context);
|
|
1049
|
-
});
|
|
1050
|
-
return retVal;
|
|
1051
|
-
};
|
|
1052
|
-
const de_ListEventSubscriptionsResponse = (output, context) => {
|
|
1053
|
-
return take(output, {
|
|
1054
|
-
nextToken: __expectString,
|
|
1055
|
-
subscriptions: (_) => de_SubscriptionList(_, context),
|
|
1056
|
-
});
|
|
1057
|
-
};
|
|
1058
|
-
const de_ResourceGroup = (output, context) => {
|
|
1059
|
-
return take(output, {
|
|
1060
|
-
arn: __expectString,
|
|
1061
|
-
createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1062
|
-
tags: _json,
|
|
1063
|
-
});
|
|
1064
|
-
};
|
|
1065
|
-
const de_ResourceGroupList = (output, context) => {
|
|
1066
|
-
const retVal = (output || [])
|
|
1067
|
-
.filter((e) => e != null)
|
|
1068
|
-
.map((entry) => {
|
|
1069
|
-
return de_ResourceGroup(entry, context);
|
|
1070
|
-
});
|
|
1071
|
-
return retVal;
|
|
1072
|
-
};
|
|
1073
|
-
const de_Subscription = (output, context) => {
|
|
1074
|
-
return take(output, {
|
|
1075
|
-
eventSubscriptions: (_) => de_EventSubscriptionList(_, context),
|
|
1076
|
-
resourceArn: __expectString,
|
|
1077
|
-
topicArn: __expectString,
|
|
1078
|
-
});
|
|
1079
|
-
};
|
|
1080
|
-
const de_SubscriptionList = (output, context) => {
|
|
1081
|
-
const retVal = (output || [])
|
|
1082
|
-
.filter((e) => e != null)
|
|
1083
|
-
.map((entry) => {
|
|
1084
|
-
return de_Subscription(entry, context);
|
|
1085
|
-
});
|
|
1086
|
-
return retVal;
|
|
1087
|
-
};
|
|
1088
|
-
const deserializeMetadata = (output) => ({
|
|
1089
|
-
httpStatusCode: output.statusCode,
|
|
1090
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1091
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1092
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
1093
|
-
});
|
|
1094
|
-
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1095
|
-
const throwDefaultError = withBaseException(__BaseException);
|
|
1096
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
1097
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1098
|
-
const contents = {
|
|
1099
|
-
protocol,
|
|
1100
|
-
hostname,
|
|
1101
|
-
port,
|
|
1102
|
-
method: "POST",
|
|
1103
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
1104
|
-
headers,
|
|
1105
|
-
};
|
|
1106
|
-
if (resolvedHostname !== undefined) {
|
|
1107
|
-
contents.hostname = resolvedHostname;
|
|
1108
|
-
}
|
|
1109
|
-
if (body !== undefined) {
|
|
1110
|
-
contents.body = body;
|
|
1111
|
-
}
|
|
1112
|
-
return new __HttpRequest(contents);
|
|
1113
|
-
};
|
|
1114
|
-
function sharedHeaders(operation) {
|
|
1115
|
-
return {
|
|
1116
|
-
"content-type": "application/x-amz-json-1.1",
|
|
1117
|
-
"x-amz-target": `InspectorService.${operation}`,
|
|
1118
|
-
};
|
|
1119
|
-
}
|