@aws-sdk/client-inspector 3.490.0 → 3.496.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/Inspector.js +1 -85
- package/dist-cjs/InspectorClient.js +1 -43
- package/dist-cjs/commands/AddAttributesToFindingsCommand.js +1 -28
- package/dist-cjs/commands/CreateAssessmentTargetCommand.js +1 -28
- package/dist-cjs/commands/CreateAssessmentTemplateCommand.js +1 -28
- package/dist-cjs/commands/CreateExclusionsPreviewCommand.js +1 -28
- package/dist-cjs/commands/CreateResourceGroupCommand.js +1 -28
- package/dist-cjs/commands/DeleteAssessmentRunCommand.js +1 -28
- package/dist-cjs/commands/DeleteAssessmentTargetCommand.js +1 -28
- package/dist-cjs/commands/DeleteAssessmentTemplateCommand.js +1 -28
- package/dist-cjs/commands/DescribeAssessmentRunsCommand.js +1 -28
- package/dist-cjs/commands/DescribeAssessmentTargetsCommand.js +1 -28
- package/dist-cjs/commands/DescribeAssessmentTemplatesCommand.js +1 -28
- package/dist-cjs/commands/DescribeCrossAccountAccessRoleCommand.js +1 -28
- package/dist-cjs/commands/DescribeExclusionsCommand.js +1 -28
- package/dist-cjs/commands/DescribeFindingsCommand.js +1 -28
- package/dist-cjs/commands/DescribeResourceGroupsCommand.js +1 -28
- package/dist-cjs/commands/DescribeRulesPackagesCommand.js +1 -28
- package/dist-cjs/commands/GetAssessmentReportCommand.js +1 -28
- package/dist-cjs/commands/GetExclusionsPreviewCommand.js +1 -28
- package/dist-cjs/commands/GetTelemetryMetadataCommand.js +1 -28
- package/dist-cjs/commands/ListAssessmentRunAgentsCommand.js +1 -28
- package/dist-cjs/commands/ListAssessmentRunsCommand.js +1 -28
- package/dist-cjs/commands/ListAssessmentTargetsCommand.js +1 -28
- package/dist-cjs/commands/ListAssessmentTemplatesCommand.js +1 -28
- package/dist-cjs/commands/ListEventSubscriptionsCommand.js +1 -28
- package/dist-cjs/commands/ListExclusionsCommand.js +1 -28
- package/dist-cjs/commands/ListFindingsCommand.js +1 -28
- package/dist-cjs/commands/ListRulesPackagesCommand.js +1 -28
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
- package/dist-cjs/commands/PreviewAgentsCommand.js +1 -28
- package/dist-cjs/commands/RegisterCrossAccountAccessRoleCommand.js +1 -28
- package/dist-cjs/commands/RemoveAttributesFromFindingsCommand.js +1 -28
- package/dist-cjs/commands/SetTagsForResourceCommand.js +1 -28
- package/dist-cjs/commands/StartAssessmentRunCommand.js +1 -28
- package/dist-cjs/commands/StopAssessmentRunCommand.js +1 -28
- package/dist-cjs/commands/SubscribeToEventCommand.js +1 -28
- package/dist-cjs/commands/UnsubscribeFromEventCommand.js +1 -28
- package/dist-cjs/commands/UpdateAssessmentTargetCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -40
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +3563 -11
- package/dist-cjs/models/InspectorServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -340
- package/dist-cjs/pagination/GetExclusionsPreviewPaginator.js +1 -7
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListAssessmentRunAgentsPaginator.js +1 -7
- package/dist-cjs/pagination/ListAssessmentRunsPaginator.js +1 -7
- package/dist-cjs/pagination/ListAssessmentTargetsPaginator.js +1 -7
- package/dist-cjs/pagination/ListAssessmentTemplatesPaginator.js +1 -7
- package/dist-cjs/pagination/ListEventSubscriptionsPaginator.js +1 -7
- package/dist-cjs/pagination/ListExclusionsPaginator.js +1 -7
- package/dist-cjs/pagination/ListFindingsPaginator.js +1 -7
- package/dist-cjs/pagination/ListRulesPackagesPaginator.js +1 -7
- package/dist-cjs/pagination/PreviewAgentsPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -14
- package/dist-cjs/protocols/Aws_json1_1.js +1 -2259
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,2259 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_DescribeExclusionsCommand = exports.de_DescribeCrossAccountAccessRoleCommand = exports.de_DescribeAssessmentTemplatesCommand = exports.de_DescribeAssessmentTargetsCommand = exports.de_DescribeAssessmentRunsCommand = exports.de_DeleteAssessmentTemplateCommand = exports.de_DeleteAssessmentTargetCommand = exports.de_DeleteAssessmentRunCommand = exports.de_CreateResourceGroupCommand = exports.de_CreateExclusionsPreviewCommand = exports.de_CreateAssessmentTemplateCommand = exports.de_CreateAssessmentTargetCommand = exports.de_AddAttributesToFindingsCommand = exports.se_UpdateAssessmentTargetCommand = exports.se_UnsubscribeFromEventCommand = exports.se_SubscribeToEventCommand = exports.se_StopAssessmentRunCommand = exports.se_StartAssessmentRunCommand = exports.se_SetTagsForResourceCommand = exports.se_RemoveAttributesFromFindingsCommand = exports.se_RegisterCrossAccountAccessRoleCommand = exports.se_PreviewAgentsCommand = exports.se_ListTagsForResourceCommand = exports.se_ListRulesPackagesCommand = exports.se_ListFindingsCommand = exports.se_ListExclusionsCommand = exports.se_ListEventSubscriptionsCommand = exports.se_ListAssessmentTemplatesCommand = exports.se_ListAssessmentTargetsCommand = exports.se_ListAssessmentRunsCommand = exports.se_ListAssessmentRunAgentsCommand = exports.se_GetTelemetryMetadataCommand = exports.se_GetExclusionsPreviewCommand = exports.se_GetAssessmentReportCommand = exports.se_DescribeRulesPackagesCommand = exports.se_DescribeResourceGroupsCommand = exports.se_DescribeFindingsCommand = exports.se_DescribeExclusionsCommand = exports.se_DescribeCrossAccountAccessRoleCommand = exports.se_DescribeAssessmentTemplatesCommand = exports.se_DescribeAssessmentTargetsCommand = exports.se_DescribeAssessmentRunsCommand = exports.se_DeleteAssessmentTemplateCommand = exports.se_DeleteAssessmentTargetCommand = exports.se_DeleteAssessmentRunCommand = exports.se_CreateResourceGroupCommand = exports.se_CreateExclusionsPreviewCommand = exports.se_CreateAssessmentTemplateCommand = exports.se_CreateAssessmentTargetCommand = exports.se_AddAttributesToFindingsCommand = void 0;
|
|
4
|
-
exports.de_UpdateAssessmentTargetCommand = exports.de_UnsubscribeFromEventCommand = exports.de_SubscribeToEventCommand = exports.de_StopAssessmentRunCommand = exports.de_StartAssessmentRunCommand = exports.de_SetTagsForResourceCommand = exports.de_RemoveAttributesFromFindingsCommand = exports.de_RegisterCrossAccountAccessRoleCommand = exports.de_PreviewAgentsCommand = exports.de_ListTagsForResourceCommand = exports.de_ListRulesPackagesCommand = exports.de_ListFindingsCommand = exports.de_ListExclusionsCommand = exports.de_ListEventSubscriptionsCommand = exports.de_ListAssessmentTemplatesCommand = exports.de_ListAssessmentTargetsCommand = exports.de_ListAssessmentRunsCommand = exports.de_ListAssessmentRunAgentsCommand = exports.de_GetTelemetryMetadataCommand = exports.de_GetExclusionsPreviewCommand = exports.de_GetAssessmentReportCommand = exports.de_DescribeRulesPackagesCommand = exports.de_DescribeResourceGroupsCommand = exports.de_DescribeFindingsCommand = void 0;
|
|
5
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const InspectorServiceException_1 = require("../models/InspectorServiceException");
|
|
8
|
-
const models_0_1 = require("../models/models_0");
|
|
9
|
-
const se_AddAttributesToFindingsCommand = async (input, context) => {
|
|
10
|
-
const headers = sharedHeaders("AddAttributesToFindings");
|
|
11
|
-
let body;
|
|
12
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
13
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
14
|
-
};
|
|
15
|
-
exports.se_AddAttributesToFindingsCommand = se_AddAttributesToFindingsCommand;
|
|
16
|
-
const se_CreateAssessmentTargetCommand = async (input, context) => {
|
|
17
|
-
const headers = sharedHeaders("CreateAssessmentTarget");
|
|
18
|
-
let body;
|
|
19
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
20
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
21
|
-
};
|
|
22
|
-
exports.se_CreateAssessmentTargetCommand = se_CreateAssessmentTargetCommand;
|
|
23
|
-
const se_CreateAssessmentTemplateCommand = async (input, context) => {
|
|
24
|
-
const headers = sharedHeaders("CreateAssessmentTemplate");
|
|
25
|
-
let body;
|
|
26
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
27
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
28
|
-
};
|
|
29
|
-
exports.se_CreateAssessmentTemplateCommand = se_CreateAssessmentTemplateCommand;
|
|
30
|
-
const se_CreateExclusionsPreviewCommand = async (input, context) => {
|
|
31
|
-
const headers = sharedHeaders("CreateExclusionsPreview");
|
|
32
|
-
let body;
|
|
33
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
34
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
35
|
-
};
|
|
36
|
-
exports.se_CreateExclusionsPreviewCommand = se_CreateExclusionsPreviewCommand;
|
|
37
|
-
const se_CreateResourceGroupCommand = async (input, context) => {
|
|
38
|
-
const headers = sharedHeaders("CreateResourceGroup");
|
|
39
|
-
let body;
|
|
40
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
41
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
42
|
-
};
|
|
43
|
-
exports.se_CreateResourceGroupCommand = se_CreateResourceGroupCommand;
|
|
44
|
-
const se_DeleteAssessmentRunCommand = async (input, context) => {
|
|
45
|
-
const headers = sharedHeaders("DeleteAssessmentRun");
|
|
46
|
-
let body;
|
|
47
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
48
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
49
|
-
};
|
|
50
|
-
exports.se_DeleteAssessmentRunCommand = se_DeleteAssessmentRunCommand;
|
|
51
|
-
const se_DeleteAssessmentTargetCommand = async (input, context) => {
|
|
52
|
-
const headers = sharedHeaders("DeleteAssessmentTarget");
|
|
53
|
-
let body;
|
|
54
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
55
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
56
|
-
};
|
|
57
|
-
exports.se_DeleteAssessmentTargetCommand = se_DeleteAssessmentTargetCommand;
|
|
58
|
-
const se_DeleteAssessmentTemplateCommand = async (input, context) => {
|
|
59
|
-
const headers = sharedHeaders("DeleteAssessmentTemplate");
|
|
60
|
-
let body;
|
|
61
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
62
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
63
|
-
};
|
|
64
|
-
exports.se_DeleteAssessmentTemplateCommand = se_DeleteAssessmentTemplateCommand;
|
|
65
|
-
const se_DescribeAssessmentRunsCommand = async (input, context) => {
|
|
66
|
-
const headers = sharedHeaders("DescribeAssessmentRuns");
|
|
67
|
-
let body;
|
|
68
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
69
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
70
|
-
};
|
|
71
|
-
exports.se_DescribeAssessmentRunsCommand = se_DescribeAssessmentRunsCommand;
|
|
72
|
-
const se_DescribeAssessmentTargetsCommand = async (input, context) => {
|
|
73
|
-
const headers = sharedHeaders("DescribeAssessmentTargets");
|
|
74
|
-
let body;
|
|
75
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
76
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
77
|
-
};
|
|
78
|
-
exports.se_DescribeAssessmentTargetsCommand = se_DescribeAssessmentTargetsCommand;
|
|
79
|
-
const se_DescribeAssessmentTemplatesCommand = async (input, context) => {
|
|
80
|
-
const headers = sharedHeaders("DescribeAssessmentTemplates");
|
|
81
|
-
let body;
|
|
82
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
83
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
84
|
-
};
|
|
85
|
-
exports.se_DescribeAssessmentTemplatesCommand = se_DescribeAssessmentTemplatesCommand;
|
|
86
|
-
const se_DescribeCrossAccountAccessRoleCommand = async (input, context) => {
|
|
87
|
-
const headers = sharedHeaders("DescribeCrossAccountAccessRole");
|
|
88
|
-
const body = "{}";
|
|
89
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
90
|
-
};
|
|
91
|
-
exports.se_DescribeCrossAccountAccessRoleCommand = se_DescribeCrossAccountAccessRoleCommand;
|
|
92
|
-
const se_DescribeExclusionsCommand = async (input, context) => {
|
|
93
|
-
const headers = sharedHeaders("DescribeExclusions");
|
|
94
|
-
let body;
|
|
95
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
96
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
97
|
-
};
|
|
98
|
-
exports.se_DescribeExclusionsCommand = se_DescribeExclusionsCommand;
|
|
99
|
-
const se_DescribeFindingsCommand = async (input, context) => {
|
|
100
|
-
const headers = sharedHeaders("DescribeFindings");
|
|
101
|
-
let body;
|
|
102
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
103
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
104
|
-
};
|
|
105
|
-
exports.se_DescribeFindingsCommand = se_DescribeFindingsCommand;
|
|
106
|
-
const se_DescribeResourceGroupsCommand = async (input, context) => {
|
|
107
|
-
const headers = sharedHeaders("DescribeResourceGroups");
|
|
108
|
-
let body;
|
|
109
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
110
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
111
|
-
};
|
|
112
|
-
exports.se_DescribeResourceGroupsCommand = se_DescribeResourceGroupsCommand;
|
|
113
|
-
const se_DescribeRulesPackagesCommand = async (input, context) => {
|
|
114
|
-
const headers = sharedHeaders("DescribeRulesPackages");
|
|
115
|
-
let body;
|
|
116
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
117
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
118
|
-
};
|
|
119
|
-
exports.se_DescribeRulesPackagesCommand = se_DescribeRulesPackagesCommand;
|
|
120
|
-
const se_GetAssessmentReportCommand = async (input, context) => {
|
|
121
|
-
const headers = sharedHeaders("GetAssessmentReport");
|
|
122
|
-
let body;
|
|
123
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
124
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
125
|
-
};
|
|
126
|
-
exports.se_GetAssessmentReportCommand = se_GetAssessmentReportCommand;
|
|
127
|
-
const se_GetExclusionsPreviewCommand = async (input, context) => {
|
|
128
|
-
const headers = sharedHeaders("GetExclusionsPreview");
|
|
129
|
-
let body;
|
|
130
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
131
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
132
|
-
};
|
|
133
|
-
exports.se_GetExclusionsPreviewCommand = se_GetExclusionsPreviewCommand;
|
|
134
|
-
const se_GetTelemetryMetadataCommand = async (input, context) => {
|
|
135
|
-
const headers = sharedHeaders("GetTelemetryMetadata");
|
|
136
|
-
let body;
|
|
137
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
138
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
139
|
-
};
|
|
140
|
-
exports.se_GetTelemetryMetadataCommand = se_GetTelemetryMetadataCommand;
|
|
141
|
-
const se_ListAssessmentRunAgentsCommand = async (input, context) => {
|
|
142
|
-
const headers = sharedHeaders("ListAssessmentRunAgents");
|
|
143
|
-
let body;
|
|
144
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
145
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
146
|
-
};
|
|
147
|
-
exports.se_ListAssessmentRunAgentsCommand = se_ListAssessmentRunAgentsCommand;
|
|
148
|
-
const se_ListAssessmentRunsCommand = async (input, context) => {
|
|
149
|
-
const headers = sharedHeaders("ListAssessmentRuns");
|
|
150
|
-
let body;
|
|
151
|
-
body = JSON.stringify(se_ListAssessmentRunsRequest(input, context));
|
|
152
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
153
|
-
};
|
|
154
|
-
exports.se_ListAssessmentRunsCommand = se_ListAssessmentRunsCommand;
|
|
155
|
-
const se_ListAssessmentTargetsCommand = async (input, context) => {
|
|
156
|
-
const headers = sharedHeaders("ListAssessmentTargets");
|
|
157
|
-
let body;
|
|
158
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
159
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
160
|
-
};
|
|
161
|
-
exports.se_ListAssessmentTargetsCommand = se_ListAssessmentTargetsCommand;
|
|
162
|
-
const se_ListAssessmentTemplatesCommand = async (input, context) => {
|
|
163
|
-
const headers = sharedHeaders("ListAssessmentTemplates");
|
|
164
|
-
let body;
|
|
165
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
166
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
167
|
-
};
|
|
168
|
-
exports.se_ListAssessmentTemplatesCommand = se_ListAssessmentTemplatesCommand;
|
|
169
|
-
const se_ListEventSubscriptionsCommand = async (input, context) => {
|
|
170
|
-
const headers = sharedHeaders("ListEventSubscriptions");
|
|
171
|
-
let body;
|
|
172
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
173
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
174
|
-
};
|
|
175
|
-
exports.se_ListEventSubscriptionsCommand = se_ListEventSubscriptionsCommand;
|
|
176
|
-
const se_ListExclusionsCommand = async (input, context) => {
|
|
177
|
-
const headers = sharedHeaders("ListExclusions");
|
|
178
|
-
let body;
|
|
179
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
180
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
181
|
-
};
|
|
182
|
-
exports.se_ListExclusionsCommand = se_ListExclusionsCommand;
|
|
183
|
-
const se_ListFindingsCommand = async (input, context) => {
|
|
184
|
-
const headers = sharedHeaders("ListFindings");
|
|
185
|
-
let body;
|
|
186
|
-
body = JSON.stringify(se_ListFindingsRequest(input, context));
|
|
187
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
188
|
-
};
|
|
189
|
-
exports.se_ListFindingsCommand = se_ListFindingsCommand;
|
|
190
|
-
const se_ListRulesPackagesCommand = async (input, context) => {
|
|
191
|
-
const headers = sharedHeaders("ListRulesPackages");
|
|
192
|
-
let body;
|
|
193
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
194
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
195
|
-
};
|
|
196
|
-
exports.se_ListRulesPackagesCommand = se_ListRulesPackagesCommand;
|
|
197
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
198
|
-
const headers = sharedHeaders("ListTagsForResource");
|
|
199
|
-
let body;
|
|
200
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
201
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
202
|
-
};
|
|
203
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
204
|
-
const se_PreviewAgentsCommand = async (input, context) => {
|
|
205
|
-
const headers = sharedHeaders("PreviewAgents");
|
|
206
|
-
let body;
|
|
207
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
208
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
209
|
-
};
|
|
210
|
-
exports.se_PreviewAgentsCommand = se_PreviewAgentsCommand;
|
|
211
|
-
const se_RegisterCrossAccountAccessRoleCommand = async (input, context) => {
|
|
212
|
-
const headers = sharedHeaders("RegisterCrossAccountAccessRole");
|
|
213
|
-
let body;
|
|
214
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
215
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
216
|
-
};
|
|
217
|
-
exports.se_RegisterCrossAccountAccessRoleCommand = se_RegisterCrossAccountAccessRoleCommand;
|
|
218
|
-
const se_RemoveAttributesFromFindingsCommand = async (input, context) => {
|
|
219
|
-
const headers = sharedHeaders("RemoveAttributesFromFindings");
|
|
220
|
-
let body;
|
|
221
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
222
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
223
|
-
};
|
|
224
|
-
exports.se_RemoveAttributesFromFindingsCommand = se_RemoveAttributesFromFindingsCommand;
|
|
225
|
-
const se_SetTagsForResourceCommand = async (input, context) => {
|
|
226
|
-
const headers = sharedHeaders("SetTagsForResource");
|
|
227
|
-
let body;
|
|
228
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
229
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
230
|
-
};
|
|
231
|
-
exports.se_SetTagsForResourceCommand = se_SetTagsForResourceCommand;
|
|
232
|
-
const se_StartAssessmentRunCommand = async (input, context) => {
|
|
233
|
-
const headers = sharedHeaders("StartAssessmentRun");
|
|
234
|
-
let body;
|
|
235
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
236
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
237
|
-
};
|
|
238
|
-
exports.se_StartAssessmentRunCommand = se_StartAssessmentRunCommand;
|
|
239
|
-
const se_StopAssessmentRunCommand = async (input, context) => {
|
|
240
|
-
const headers = sharedHeaders("StopAssessmentRun");
|
|
241
|
-
let body;
|
|
242
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
243
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
244
|
-
};
|
|
245
|
-
exports.se_StopAssessmentRunCommand = se_StopAssessmentRunCommand;
|
|
246
|
-
const se_SubscribeToEventCommand = async (input, context) => {
|
|
247
|
-
const headers = sharedHeaders("SubscribeToEvent");
|
|
248
|
-
let body;
|
|
249
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
250
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
251
|
-
};
|
|
252
|
-
exports.se_SubscribeToEventCommand = se_SubscribeToEventCommand;
|
|
253
|
-
const se_UnsubscribeFromEventCommand = async (input, context) => {
|
|
254
|
-
const headers = sharedHeaders("UnsubscribeFromEvent");
|
|
255
|
-
let body;
|
|
256
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
257
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
258
|
-
};
|
|
259
|
-
exports.se_UnsubscribeFromEventCommand = se_UnsubscribeFromEventCommand;
|
|
260
|
-
const se_UpdateAssessmentTargetCommand = async (input, context) => {
|
|
261
|
-
const headers = sharedHeaders("UpdateAssessmentTarget");
|
|
262
|
-
let body;
|
|
263
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
264
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
265
|
-
};
|
|
266
|
-
exports.se_UpdateAssessmentTargetCommand = se_UpdateAssessmentTargetCommand;
|
|
267
|
-
const de_AddAttributesToFindingsCommand = async (output, context) => {
|
|
268
|
-
if (output.statusCode >= 300) {
|
|
269
|
-
return de_AddAttributesToFindingsCommandError(output, context);
|
|
270
|
-
}
|
|
271
|
-
const data = await parseBody(output.body, context);
|
|
272
|
-
let contents = {};
|
|
273
|
-
contents = (0, smithy_client_1._json)(data);
|
|
274
|
-
const response = {
|
|
275
|
-
$metadata: deserializeMetadata(output),
|
|
276
|
-
...contents,
|
|
277
|
-
};
|
|
278
|
-
return response;
|
|
279
|
-
};
|
|
280
|
-
exports.de_AddAttributesToFindingsCommand = de_AddAttributesToFindingsCommand;
|
|
281
|
-
const de_AddAttributesToFindingsCommandError = async (output, context) => {
|
|
282
|
-
const parsedOutput = {
|
|
283
|
-
...output,
|
|
284
|
-
body: await parseErrorBody(output.body, context),
|
|
285
|
-
};
|
|
286
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
287
|
-
switch (errorCode) {
|
|
288
|
-
case "AccessDeniedException":
|
|
289
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
290
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
291
|
-
case "InternalException":
|
|
292
|
-
case "com.amazonaws.inspector#InternalException":
|
|
293
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
294
|
-
case "InvalidInputException":
|
|
295
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
296
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
297
|
-
case "NoSuchEntityException":
|
|
298
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
299
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
300
|
-
case "ServiceTemporarilyUnavailableException":
|
|
301
|
-
case "com.amazonaws.inspector#ServiceTemporarilyUnavailableException":
|
|
302
|
-
throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context);
|
|
303
|
-
default:
|
|
304
|
-
const parsedBody = parsedOutput.body;
|
|
305
|
-
return throwDefaultError({
|
|
306
|
-
output,
|
|
307
|
-
parsedBody,
|
|
308
|
-
errorCode,
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
};
|
|
312
|
-
const de_CreateAssessmentTargetCommand = async (output, context) => {
|
|
313
|
-
if (output.statusCode >= 300) {
|
|
314
|
-
return de_CreateAssessmentTargetCommandError(output, context);
|
|
315
|
-
}
|
|
316
|
-
const data = await parseBody(output.body, context);
|
|
317
|
-
let contents = {};
|
|
318
|
-
contents = (0, smithy_client_1._json)(data);
|
|
319
|
-
const response = {
|
|
320
|
-
$metadata: deserializeMetadata(output),
|
|
321
|
-
...contents,
|
|
322
|
-
};
|
|
323
|
-
return response;
|
|
324
|
-
};
|
|
325
|
-
exports.de_CreateAssessmentTargetCommand = de_CreateAssessmentTargetCommand;
|
|
326
|
-
const de_CreateAssessmentTargetCommandError = async (output, context) => {
|
|
327
|
-
const parsedOutput = {
|
|
328
|
-
...output,
|
|
329
|
-
body: await parseErrorBody(output.body, context),
|
|
330
|
-
};
|
|
331
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
332
|
-
switch (errorCode) {
|
|
333
|
-
case "AccessDeniedException":
|
|
334
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
335
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
336
|
-
case "InternalException":
|
|
337
|
-
case "com.amazonaws.inspector#InternalException":
|
|
338
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
339
|
-
case "InvalidCrossAccountRoleException":
|
|
340
|
-
case "com.amazonaws.inspector#InvalidCrossAccountRoleException":
|
|
341
|
-
throw await de_InvalidCrossAccountRoleExceptionRes(parsedOutput, context);
|
|
342
|
-
case "InvalidInputException":
|
|
343
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
344
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
345
|
-
case "LimitExceededException":
|
|
346
|
-
case "com.amazonaws.inspector#LimitExceededException":
|
|
347
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
348
|
-
case "NoSuchEntityException":
|
|
349
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
350
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
351
|
-
case "ServiceTemporarilyUnavailableException":
|
|
352
|
-
case "com.amazonaws.inspector#ServiceTemporarilyUnavailableException":
|
|
353
|
-
throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context);
|
|
354
|
-
default:
|
|
355
|
-
const parsedBody = parsedOutput.body;
|
|
356
|
-
return throwDefaultError({
|
|
357
|
-
output,
|
|
358
|
-
parsedBody,
|
|
359
|
-
errorCode,
|
|
360
|
-
});
|
|
361
|
-
}
|
|
362
|
-
};
|
|
363
|
-
const de_CreateAssessmentTemplateCommand = async (output, context) => {
|
|
364
|
-
if (output.statusCode >= 300) {
|
|
365
|
-
return de_CreateAssessmentTemplateCommandError(output, context);
|
|
366
|
-
}
|
|
367
|
-
const data = await parseBody(output.body, context);
|
|
368
|
-
let contents = {};
|
|
369
|
-
contents = (0, smithy_client_1._json)(data);
|
|
370
|
-
const response = {
|
|
371
|
-
$metadata: deserializeMetadata(output),
|
|
372
|
-
...contents,
|
|
373
|
-
};
|
|
374
|
-
return response;
|
|
375
|
-
};
|
|
376
|
-
exports.de_CreateAssessmentTemplateCommand = de_CreateAssessmentTemplateCommand;
|
|
377
|
-
const de_CreateAssessmentTemplateCommandError = async (output, context) => {
|
|
378
|
-
const parsedOutput = {
|
|
379
|
-
...output,
|
|
380
|
-
body: await parseErrorBody(output.body, context),
|
|
381
|
-
};
|
|
382
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
383
|
-
switch (errorCode) {
|
|
384
|
-
case "AccessDeniedException":
|
|
385
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
386
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
387
|
-
case "InternalException":
|
|
388
|
-
case "com.amazonaws.inspector#InternalException":
|
|
389
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
390
|
-
case "InvalidInputException":
|
|
391
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
392
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
393
|
-
case "LimitExceededException":
|
|
394
|
-
case "com.amazonaws.inspector#LimitExceededException":
|
|
395
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
396
|
-
case "NoSuchEntityException":
|
|
397
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
398
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
399
|
-
case "ServiceTemporarilyUnavailableException":
|
|
400
|
-
case "com.amazonaws.inspector#ServiceTemporarilyUnavailableException":
|
|
401
|
-
throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context);
|
|
402
|
-
default:
|
|
403
|
-
const parsedBody = parsedOutput.body;
|
|
404
|
-
return throwDefaultError({
|
|
405
|
-
output,
|
|
406
|
-
parsedBody,
|
|
407
|
-
errorCode,
|
|
408
|
-
});
|
|
409
|
-
}
|
|
410
|
-
};
|
|
411
|
-
const de_CreateExclusionsPreviewCommand = async (output, context) => {
|
|
412
|
-
if (output.statusCode >= 300) {
|
|
413
|
-
return de_CreateExclusionsPreviewCommandError(output, context);
|
|
414
|
-
}
|
|
415
|
-
const data = await parseBody(output.body, context);
|
|
416
|
-
let contents = {};
|
|
417
|
-
contents = (0, smithy_client_1._json)(data);
|
|
418
|
-
const response = {
|
|
419
|
-
$metadata: deserializeMetadata(output),
|
|
420
|
-
...contents,
|
|
421
|
-
};
|
|
422
|
-
return response;
|
|
423
|
-
};
|
|
424
|
-
exports.de_CreateExclusionsPreviewCommand = de_CreateExclusionsPreviewCommand;
|
|
425
|
-
const de_CreateExclusionsPreviewCommandError = async (output, context) => {
|
|
426
|
-
const parsedOutput = {
|
|
427
|
-
...output,
|
|
428
|
-
body: await parseErrorBody(output.body, context),
|
|
429
|
-
};
|
|
430
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
431
|
-
switch (errorCode) {
|
|
432
|
-
case "AccessDeniedException":
|
|
433
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
434
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
435
|
-
case "InternalException":
|
|
436
|
-
case "com.amazonaws.inspector#InternalException":
|
|
437
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
438
|
-
case "InvalidInputException":
|
|
439
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
440
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
441
|
-
case "NoSuchEntityException":
|
|
442
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
443
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
444
|
-
case "PreviewGenerationInProgressException":
|
|
445
|
-
case "com.amazonaws.inspector#PreviewGenerationInProgressException":
|
|
446
|
-
throw await de_PreviewGenerationInProgressExceptionRes(parsedOutput, context);
|
|
447
|
-
case "ServiceTemporarilyUnavailableException":
|
|
448
|
-
case "com.amazonaws.inspector#ServiceTemporarilyUnavailableException":
|
|
449
|
-
throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context);
|
|
450
|
-
default:
|
|
451
|
-
const parsedBody = parsedOutput.body;
|
|
452
|
-
return throwDefaultError({
|
|
453
|
-
output,
|
|
454
|
-
parsedBody,
|
|
455
|
-
errorCode,
|
|
456
|
-
});
|
|
457
|
-
}
|
|
458
|
-
};
|
|
459
|
-
const de_CreateResourceGroupCommand = async (output, context) => {
|
|
460
|
-
if (output.statusCode >= 300) {
|
|
461
|
-
return de_CreateResourceGroupCommandError(output, context);
|
|
462
|
-
}
|
|
463
|
-
const data = await parseBody(output.body, context);
|
|
464
|
-
let contents = {};
|
|
465
|
-
contents = (0, smithy_client_1._json)(data);
|
|
466
|
-
const response = {
|
|
467
|
-
$metadata: deserializeMetadata(output),
|
|
468
|
-
...contents,
|
|
469
|
-
};
|
|
470
|
-
return response;
|
|
471
|
-
};
|
|
472
|
-
exports.de_CreateResourceGroupCommand = de_CreateResourceGroupCommand;
|
|
473
|
-
const de_CreateResourceGroupCommandError = async (output, context) => {
|
|
474
|
-
const parsedOutput = {
|
|
475
|
-
...output,
|
|
476
|
-
body: await parseErrorBody(output.body, context),
|
|
477
|
-
};
|
|
478
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
479
|
-
switch (errorCode) {
|
|
480
|
-
case "AccessDeniedException":
|
|
481
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
482
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
483
|
-
case "InternalException":
|
|
484
|
-
case "com.amazonaws.inspector#InternalException":
|
|
485
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
486
|
-
case "InvalidInputException":
|
|
487
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
488
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
489
|
-
case "LimitExceededException":
|
|
490
|
-
case "com.amazonaws.inspector#LimitExceededException":
|
|
491
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
492
|
-
case "ServiceTemporarilyUnavailableException":
|
|
493
|
-
case "com.amazonaws.inspector#ServiceTemporarilyUnavailableException":
|
|
494
|
-
throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context);
|
|
495
|
-
default:
|
|
496
|
-
const parsedBody = parsedOutput.body;
|
|
497
|
-
return throwDefaultError({
|
|
498
|
-
output,
|
|
499
|
-
parsedBody,
|
|
500
|
-
errorCode,
|
|
501
|
-
});
|
|
502
|
-
}
|
|
503
|
-
};
|
|
504
|
-
const de_DeleteAssessmentRunCommand = async (output, context) => {
|
|
505
|
-
if (output.statusCode >= 300) {
|
|
506
|
-
return de_DeleteAssessmentRunCommandError(output, context);
|
|
507
|
-
}
|
|
508
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
509
|
-
const response = {
|
|
510
|
-
$metadata: deserializeMetadata(output),
|
|
511
|
-
};
|
|
512
|
-
return response;
|
|
513
|
-
};
|
|
514
|
-
exports.de_DeleteAssessmentRunCommand = de_DeleteAssessmentRunCommand;
|
|
515
|
-
const de_DeleteAssessmentRunCommandError = async (output, context) => {
|
|
516
|
-
const parsedOutput = {
|
|
517
|
-
...output,
|
|
518
|
-
body: await parseErrorBody(output.body, context),
|
|
519
|
-
};
|
|
520
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
521
|
-
switch (errorCode) {
|
|
522
|
-
case "AccessDeniedException":
|
|
523
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
524
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
525
|
-
case "AssessmentRunInProgressException":
|
|
526
|
-
case "com.amazonaws.inspector#AssessmentRunInProgressException":
|
|
527
|
-
throw await de_AssessmentRunInProgressExceptionRes(parsedOutput, context);
|
|
528
|
-
case "InternalException":
|
|
529
|
-
case "com.amazonaws.inspector#InternalException":
|
|
530
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
531
|
-
case "InvalidInputException":
|
|
532
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
533
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
534
|
-
case "NoSuchEntityException":
|
|
535
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
536
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
537
|
-
case "ServiceTemporarilyUnavailableException":
|
|
538
|
-
case "com.amazonaws.inspector#ServiceTemporarilyUnavailableException":
|
|
539
|
-
throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context);
|
|
540
|
-
default:
|
|
541
|
-
const parsedBody = parsedOutput.body;
|
|
542
|
-
return throwDefaultError({
|
|
543
|
-
output,
|
|
544
|
-
parsedBody,
|
|
545
|
-
errorCode,
|
|
546
|
-
});
|
|
547
|
-
}
|
|
548
|
-
};
|
|
549
|
-
const de_DeleteAssessmentTargetCommand = async (output, context) => {
|
|
550
|
-
if (output.statusCode >= 300) {
|
|
551
|
-
return de_DeleteAssessmentTargetCommandError(output, context);
|
|
552
|
-
}
|
|
553
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
554
|
-
const response = {
|
|
555
|
-
$metadata: deserializeMetadata(output),
|
|
556
|
-
};
|
|
557
|
-
return response;
|
|
558
|
-
};
|
|
559
|
-
exports.de_DeleteAssessmentTargetCommand = de_DeleteAssessmentTargetCommand;
|
|
560
|
-
const de_DeleteAssessmentTargetCommandError = async (output, context) => {
|
|
561
|
-
const parsedOutput = {
|
|
562
|
-
...output,
|
|
563
|
-
body: await parseErrorBody(output.body, context),
|
|
564
|
-
};
|
|
565
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
566
|
-
switch (errorCode) {
|
|
567
|
-
case "AccessDeniedException":
|
|
568
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
569
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
570
|
-
case "AssessmentRunInProgressException":
|
|
571
|
-
case "com.amazonaws.inspector#AssessmentRunInProgressException":
|
|
572
|
-
throw await de_AssessmentRunInProgressExceptionRes(parsedOutput, context);
|
|
573
|
-
case "InternalException":
|
|
574
|
-
case "com.amazonaws.inspector#InternalException":
|
|
575
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
576
|
-
case "InvalidInputException":
|
|
577
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
578
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
579
|
-
case "NoSuchEntityException":
|
|
580
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
581
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
582
|
-
case "ServiceTemporarilyUnavailableException":
|
|
583
|
-
case "com.amazonaws.inspector#ServiceTemporarilyUnavailableException":
|
|
584
|
-
throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context);
|
|
585
|
-
default:
|
|
586
|
-
const parsedBody = parsedOutput.body;
|
|
587
|
-
return throwDefaultError({
|
|
588
|
-
output,
|
|
589
|
-
parsedBody,
|
|
590
|
-
errorCode,
|
|
591
|
-
});
|
|
592
|
-
}
|
|
593
|
-
};
|
|
594
|
-
const de_DeleteAssessmentTemplateCommand = async (output, context) => {
|
|
595
|
-
if (output.statusCode >= 300) {
|
|
596
|
-
return de_DeleteAssessmentTemplateCommandError(output, context);
|
|
597
|
-
}
|
|
598
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
599
|
-
const response = {
|
|
600
|
-
$metadata: deserializeMetadata(output),
|
|
601
|
-
};
|
|
602
|
-
return response;
|
|
603
|
-
};
|
|
604
|
-
exports.de_DeleteAssessmentTemplateCommand = de_DeleteAssessmentTemplateCommand;
|
|
605
|
-
const de_DeleteAssessmentTemplateCommandError = async (output, context) => {
|
|
606
|
-
const parsedOutput = {
|
|
607
|
-
...output,
|
|
608
|
-
body: await parseErrorBody(output.body, context),
|
|
609
|
-
};
|
|
610
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
611
|
-
switch (errorCode) {
|
|
612
|
-
case "AccessDeniedException":
|
|
613
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
614
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
615
|
-
case "AssessmentRunInProgressException":
|
|
616
|
-
case "com.amazonaws.inspector#AssessmentRunInProgressException":
|
|
617
|
-
throw await de_AssessmentRunInProgressExceptionRes(parsedOutput, context);
|
|
618
|
-
case "InternalException":
|
|
619
|
-
case "com.amazonaws.inspector#InternalException":
|
|
620
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
621
|
-
case "InvalidInputException":
|
|
622
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
623
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
624
|
-
case "NoSuchEntityException":
|
|
625
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
626
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
627
|
-
case "ServiceTemporarilyUnavailableException":
|
|
628
|
-
case "com.amazonaws.inspector#ServiceTemporarilyUnavailableException":
|
|
629
|
-
throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context);
|
|
630
|
-
default:
|
|
631
|
-
const parsedBody = parsedOutput.body;
|
|
632
|
-
return throwDefaultError({
|
|
633
|
-
output,
|
|
634
|
-
parsedBody,
|
|
635
|
-
errorCode,
|
|
636
|
-
});
|
|
637
|
-
}
|
|
638
|
-
};
|
|
639
|
-
const de_DescribeAssessmentRunsCommand = async (output, context) => {
|
|
640
|
-
if (output.statusCode >= 300) {
|
|
641
|
-
return de_DescribeAssessmentRunsCommandError(output, context);
|
|
642
|
-
}
|
|
643
|
-
const data = await parseBody(output.body, context);
|
|
644
|
-
let contents = {};
|
|
645
|
-
contents = de_DescribeAssessmentRunsResponse(data, context);
|
|
646
|
-
const response = {
|
|
647
|
-
$metadata: deserializeMetadata(output),
|
|
648
|
-
...contents,
|
|
649
|
-
};
|
|
650
|
-
return response;
|
|
651
|
-
};
|
|
652
|
-
exports.de_DescribeAssessmentRunsCommand = de_DescribeAssessmentRunsCommand;
|
|
653
|
-
const de_DescribeAssessmentRunsCommandError = async (output, context) => {
|
|
654
|
-
const parsedOutput = {
|
|
655
|
-
...output,
|
|
656
|
-
body: await parseErrorBody(output.body, context),
|
|
657
|
-
};
|
|
658
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
659
|
-
switch (errorCode) {
|
|
660
|
-
case "InternalException":
|
|
661
|
-
case "com.amazonaws.inspector#InternalException":
|
|
662
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
663
|
-
case "InvalidInputException":
|
|
664
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
665
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
666
|
-
default:
|
|
667
|
-
const parsedBody = parsedOutput.body;
|
|
668
|
-
return throwDefaultError({
|
|
669
|
-
output,
|
|
670
|
-
parsedBody,
|
|
671
|
-
errorCode,
|
|
672
|
-
});
|
|
673
|
-
}
|
|
674
|
-
};
|
|
675
|
-
const de_DescribeAssessmentTargetsCommand = async (output, context) => {
|
|
676
|
-
if (output.statusCode >= 300) {
|
|
677
|
-
return de_DescribeAssessmentTargetsCommandError(output, context);
|
|
678
|
-
}
|
|
679
|
-
const data = await parseBody(output.body, context);
|
|
680
|
-
let contents = {};
|
|
681
|
-
contents = de_DescribeAssessmentTargetsResponse(data, context);
|
|
682
|
-
const response = {
|
|
683
|
-
$metadata: deserializeMetadata(output),
|
|
684
|
-
...contents,
|
|
685
|
-
};
|
|
686
|
-
return response;
|
|
687
|
-
};
|
|
688
|
-
exports.de_DescribeAssessmentTargetsCommand = de_DescribeAssessmentTargetsCommand;
|
|
689
|
-
const de_DescribeAssessmentTargetsCommandError = async (output, context) => {
|
|
690
|
-
const parsedOutput = {
|
|
691
|
-
...output,
|
|
692
|
-
body: await parseErrorBody(output.body, context),
|
|
693
|
-
};
|
|
694
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
695
|
-
switch (errorCode) {
|
|
696
|
-
case "InternalException":
|
|
697
|
-
case "com.amazonaws.inspector#InternalException":
|
|
698
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
699
|
-
case "InvalidInputException":
|
|
700
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
701
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
702
|
-
default:
|
|
703
|
-
const parsedBody = parsedOutput.body;
|
|
704
|
-
return throwDefaultError({
|
|
705
|
-
output,
|
|
706
|
-
parsedBody,
|
|
707
|
-
errorCode,
|
|
708
|
-
});
|
|
709
|
-
}
|
|
710
|
-
};
|
|
711
|
-
const de_DescribeAssessmentTemplatesCommand = async (output, context) => {
|
|
712
|
-
if (output.statusCode >= 300) {
|
|
713
|
-
return de_DescribeAssessmentTemplatesCommandError(output, context);
|
|
714
|
-
}
|
|
715
|
-
const data = await parseBody(output.body, context);
|
|
716
|
-
let contents = {};
|
|
717
|
-
contents = de_DescribeAssessmentTemplatesResponse(data, context);
|
|
718
|
-
const response = {
|
|
719
|
-
$metadata: deserializeMetadata(output),
|
|
720
|
-
...contents,
|
|
721
|
-
};
|
|
722
|
-
return response;
|
|
723
|
-
};
|
|
724
|
-
exports.de_DescribeAssessmentTemplatesCommand = de_DescribeAssessmentTemplatesCommand;
|
|
725
|
-
const de_DescribeAssessmentTemplatesCommandError = async (output, context) => {
|
|
726
|
-
const parsedOutput = {
|
|
727
|
-
...output,
|
|
728
|
-
body: await parseErrorBody(output.body, context),
|
|
729
|
-
};
|
|
730
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
731
|
-
switch (errorCode) {
|
|
732
|
-
case "InternalException":
|
|
733
|
-
case "com.amazonaws.inspector#InternalException":
|
|
734
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
735
|
-
case "InvalidInputException":
|
|
736
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
737
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
738
|
-
default:
|
|
739
|
-
const parsedBody = parsedOutput.body;
|
|
740
|
-
return throwDefaultError({
|
|
741
|
-
output,
|
|
742
|
-
parsedBody,
|
|
743
|
-
errorCode,
|
|
744
|
-
});
|
|
745
|
-
}
|
|
746
|
-
};
|
|
747
|
-
const de_DescribeCrossAccountAccessRoleCommand = async (output, context) => {
|
|
748
|
-
if (output.statusCode >= 300) {
|
|
749
|
-
return de_DescribeCrossAccountAccessRoleCommandError(output, context);
|
|
750
|
-
}
|
|
751
|
-
const data = await parseBody(output.body, context);
|
|
752
|
-
let contents = {};
|
|
753
|
-
contents = de_DescribeCrossAccountAccessRoleResponse(data, context);
|
|
754
|
-
const response = {
|
|
755
|
-
$metadata: deserializeMetadata(output),
|
|
756
|
-
...contents,
|
|
757
|
-
};
|
|
758
|
-
return response;
|
|
759
|
-
};
|
|
760
|
-
exports.de_DescribeCrossAccountAccessRoleCommand = de_DescribeCrossAccountAccessRoleCommand;
|
|
761
|
-
const de_DescribeCrossAccountAccessRoleCommandError = async (output, context) => {
|
|
762
|
-
const parsedOutput = {
|
|
763
|
-
...output,
|
|
764
|
-
body: await parseErrorBody(output.body, context),
|
|
765
|
-
};
|
|
766
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
767
|
-
switch (errorCode) {
|
|
768
|
-
case "InternalException":
|
|
769
|
-
case "com.amazonaws.inspector#InternalException":
|
|
770
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
771
|
-
default:
|
|
772
|
-
const parsedBody = parsedOutput.body;
|
|
773
|
-
return throwDefaultError({
|
|
774
|
-
output,
|
|
775
|
-
parsedBody,
|
|
776
|
-
errorCode,
|
|
777
|
-
});
|
|
778
|
-
}
|
|
779
|
-
};
|
|
780
|
-
const de_DescribeExclusionsCommand = async (output, context) => {
|
|
781
|
-
if (output.statusCode >= 300) {
|
|
782
|
-
return de_DescribeExclusionsCommandError(output, context);
|
|
783
|
-
}
|
|
784
|
-
const data = await parseBody(output.body, context);
|
|
785
|
-
let contents = {};
|
|
786
|
-
contents = (0, smithy_client_1._json)(data);
|
|
787
|
-
const response = {
|
|
788
|
-
$metadata: deserializeMetadata(output),
|
|
789
|
-
...contents,
|
|
790
|
-
};
|
|
791
|
-
return response;
|
|
792
|
-
};
|
|
793
|
-
exports.de_DescribeExclusionsCommand = de_DescribeExclusionsCommand;
|
|
794
|
-
const de_DescribeExclusionsCommandError = async (output, context) => {
|
|
795
|
-
const parsedOutput = {
|
|
796
|
-
...output,
|
|
797
|
-
body: await parseErrorBody(output.body, context),
|
|
798
|
-
};
|
|
799
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
800
|
-
switch (errorCode) {
|
|
801
|
-
case "InternalException":
|
|
802
|
-
case "com.amazonaws.inspector#InternalException":
|
|
803
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
804
|
-
case "InvalidInputException":
|
|
805
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
806
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
807
|
-
default:
|
|
808
|
-
const parsedBody = parsedOutput.body;
|
|
809
|
-
return throwDefaultError({
|
|
810
|
-
output,
|
|
811
|
-
parsedBody,
|
|
812
|
-
errorCode,
|
|
813
|
-
});
|
|
814
|
-
}
|
|
815
|
-
};
|
|
816
|
-
const de_DescribeFindingsCommand = async (output, context) => {
|
|
817
|
-
if (output.statusCode >= 300) {
|
|
818
|
-
return de_DescribeFindingsCommandError(output, context);
|
|
819
|
-
}
|
|
820
|
-
const data = await parseBody(output.body, context);
|
|
821
|
-
let contents = {};
|
|
822
|
-
contents = de_DescribeFindingsResponse(data, context);
|
|
823
|
-
const response = {
|
|
824
|
-
$metadata: deserializeMetadata(output),
|
|
825
|
-
...contents,
|
|
826
|
-
};
|
|
827
|
-
return response;
|
|
828
|
-
};
|
|
829
|
-
exports.de_DescribeFindingsCommand = de_DescribeFindingsCommand;
|
|
830
|
-
const de_DescribeFindingsCommandError = async (output, context) => {
|
|
831
|
-
const parsedOutput = {
|
|
832
|
-
...output,
|
|
833
|
-
body: await parseErrorBody(output.body, context),
|
|
834
|
-
};
|
|
835
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
836
|
-
switch (errorCode) {
|
|
837
|
-
case "InternalException":
|
|
838
|
-
case "com.amazonaws.inspector#InternalException":
|
|
839
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
840
|
-
case "InvalidInputException":
|
|
841
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
842
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
843
|
-
default:
|
|
844
|
-
const parsedBody = parsedOutput.body;
|
|
845
|
-
return throwDefaultError({
|
|
846
|
-
output,
|
|
847
|
-
parsedBody,
|
|
848
|
-
errorCode,
|
|
849
|
-
});
|
|
850
|
-
}
|
|
851
|
-
};
|
|
852
|
-
const de_DescribeResourceGroupsCommand = async (output, context) => {
|
|
853
|
-
if (output.statusCode >= 300) {
|
|
854
|
-
return de_DescribeResourceGroupsCommandError(output, context);
|
|
855
|
-
}
|
|
856
|
-
const data = await parseBody(output.body, context);
|
|
857
|
-
let contents = {};
|
|
858
|
-
contents = de_DescribeResourceGroupsResponse(data, context);
|
|
859
|
-
const response = {
|
|
860
|
-
$metadata: deserializeMetadata(output),
|
|
861
|
-
...contents,
|
|
862
|
-
};
|
|
863
|
-
return response;
|
|
864
|
-
};
|
|
865
|
-
exports.de_DescribeResourceGroupsCommand = de_DescribeResourceGroupsCommand;
|
|
866
|
-
const de_DescribeResourceGroupsCommandError = async (output, context) => {
|
|
867
|
-
const parsedOutput = {
|
|
868
|
-
...output,
|
|
869
|
-
body: await parseErrorBody(output.body, context),
|
|
870
|
-
};
|
|
871
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
872
|
-
switch (errorCode) {
|
|
873
|
-
case "InternalException":
|
|
874
|
-
case "com.amazonaws.inspector#InternalException":
|
|
875
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
876
|
-
case "InvalidInputException":
|
|
877
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
878
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
879
|
-
default:
|
|
880
|
-
const parsedBody = parsedOutput.body;
|
|
881
|
-
return throwDefaultError({
|
|
882
|
-
output,
|
|
883
|
-
parsedBody,
|
|
884
|
-
errorCode,
|
|
885
|
-
});
|
|
886
|
-
}
|
|
887
|
-
};
|
|
888
|
-
const de_DescribeRulesPackagesCommand = async (output, context) => {
|
|
889
|
-
if (output.statusCode >= 300) {
|
|
890
|
-
return de_DescribeRulesPackagesCommandError(output, context);
|
|
891
|
-
}
|
|
892
|
-
const data = await parseBody(output.body, context);
|
|
893
|
-
let contents = {};
|
|
894
|
-
contents = (0, smithy_client_1._json)(data);
|
|
895
|
-
const response = {
|
|
896
|
-
$metadata: deserializeMetadata(output),
|
|
897
|
-
...contents,
|
|
898
|
-
};
|
|
899
|
-
return response;
|
|
900
|
-
};
|
|
901
|
-
exports.de_DescribeRulesPackagesCommand = de_DescribeRulesPackagesCommand;
|
|
902
|
-
const de_DescribeRulesPackagesCommandError = async (output, context) => {
|
|
903
|
-
const parsedOutput = {
|
|
904
|
-
...output,
|
|
905
|
-
body: await parseErrorBody(output.body, context),
|
|
906
|
-
};
|
|
907
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
908
|
-
switch (errorCode) {
|
|
909
|
-
case "InternalException":
|
|
910
|
-
case "com.amazonaws.inspector#InternalException":
|
|
911
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
912
|
-
case "InvalidInputException":
|
|
913
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
914
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
915
|
-
default:
|
|
916
|
-
const parsedBody = parsedOutput.body;
|
|
917
|
-
return throwDefaultError({
|
|
918
|
-
output,
|
|
919
|
-
parsedBody,
|
|
920
|
-
errorCode,
|
|
921
|
-
});
|
|
922
|
-
}
|
|
923
|
-
};
|
|
924
|
-
const de_GetAssessmentReportCommand = async (output, context) => {
|
|
925
|
-
if (output.statusCode >= 300) {
|
|
926
|
-
return de_GetAssessmentReportCommandError(output, context);
|
|
927
|
-
}
|
|
928
|
-
const data = await parseBody(output.body, context);
|
|
929
|
-
let contents = {};
|
|
930
|
-
contents = (0, smithy_client_1._json)(data);
|
|
931
|
-
const response = {
|
|
932
|
-
$metadata: deserializeMetadata(output),
|
|
933
|
-
...contents,
|
|
934
|
-
};
|
|
935
|
-
return response;
|
|
936
|
-
};
|
|
937
|
-
exports.de_GetAssessmentReportCommand = de_GetAssessmentReportCommand;
|
|
938
|
-
const de_GetAssessmentReportCommandError = async (output, context) => {
|
|
939
|
-
const parsedOutput = {
|
|
940
|
-
...output,
|
|
941
|
-
body: await parseErrorBody(output.body, context),
|
|
942
|
-
};
|
|
943
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
944
|
-
switch (errorCode) {
|
|
945
|
-
case "AccessDeniedException":
|
|
946
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
947
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
948
|
-
case "AssessmentRunInProgressException":
|
|
949
|
-
case "com.amazonaws.inspector#AssessmentRunInProgressException":
|
|
950
|
-
throw await de_AssessmentRunInProgressExceptionRes(parsedOutput, context);
|
|
951
|
-
case "InternalException":
|
|
952
|
-
case "com.amazonaws.inspector#InternalException":
|
|
953
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
954
|
-
case "InvalidInputException":
|
|
955
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
956
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
957
|
-
case "NoSuchEntityException":
|
|
958
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
959
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
960
|
-
case "ServiceTemporarilyUnavailableException":
|
|
961
|
-
case "com.amazonaws.inspector#ServiceTemporarilyUnavailableException":
|
|
962
|
-
throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context);
|
|
963
|
-
case "UnsupportedFeatureException":
|
|
964
|
-
case "com.amazonaws.inspector#UnsupportedFeatureException":
|
|
965
|
-
throw await de_UnsupportedFeatureExceptionRes(parsedOutput, context);
|
|
966
|
-
default:
|
|
967
|
-
const parsedBody = parsedOutput.body;
|
|
968
|
-
return throwDefaultError({
|
|
969
|
-
output,
|
|
970
|
-
parsedBody,
|
|
971
|
-
errorCode,
|
|
972
|
-
});
|
|
973
|
-
}
|
|
974
|
-
};
|
|
975
|
-
const de_GetExclusionsPreviewCommand = async (output, context) => {
|
|
976
|
-
if (output.statusCode >= 300) {
|
|
977
|
-
return de_GetExclusionsPreviewCommandError(output, context);
|
|
978
|
-
}
|
|
979
|
-
const data = await parseBody(output.body, context);
|
|
980
|
-
let contents = {};
|
|
981
|
-
contents = (0, smithy_client_1._json)(data);
|
|
982
|
-
const response = {
|
|
983
|
-
$metadata: deserializeMetadata(output),
|
|
984
|
-
...contents,
|
|
985
|
-
};
|
|
986
|
-
return response;
|
|
987
|
-
};
|
|
988
|
-
exports.de_GetExclusionsPreviewCommand = de_GetExclusionsPreviewCommand;
|
|
989
|
-
const de_GetExclusionsPreviewCommandError = async (output, context) => {
|
|
990
|
-
const parsedOutput = {
|
|
991
|
-
...output,
|
|
992
|
-
body: await parseErrorBody(output.body, context),
|
|
993
|
-
};
|
|
994
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
995
|
-
switch (errorCode) {
|
|
996
|
-
case "AccessDeniedException":
|
|
997
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
998
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
999
|
-
case "InternalException":
|
|
1000
|
-
case "com.amazonaws.inspector#InternalException":
|
|
1001
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
1002
|
-
case "InvalidInputException":
|
|
1003
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
1004
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
1005
|
-
case "NoSuchEntityException":
|
|
1006
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
1007
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
1008
|
-
default:
|
|
1009
|
-
const parsedBody = parsedOutput.body;
|
|
1010
|
-
return throwDefaultError({
|
|
1011
|
-
output,
|
|
1012
|
-
parsedBody,
|
|
1013
|
-
errorCode,
|
|
1014
|
-
});
|
|
1015
|
-
}
|
|
1016
|
-
};
|
|
1017
|
-
const de_GetTelemetryMetadataCommand = async (output, context) => {
|
|
1018
|
-
if (output.statusCode >= 300) {
|
|
1019
|
-
return de_GetTelemetryMetadataCommandError(output, context);
|
|
1020
|
-
}
|
|
1021
|
-
const data = await parseBody(output.body, context);
|
|
1022
|
-
let contents = {};
|
|
1023
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1024
|
-
const response = {
|
|
1025
|
-
$metadata: deserializeMetadata(output),
|
|
1026
|
-
...contents,
|
|
1027
|
-
};
|
|
1028
|
-
return response;
|
|
1029
|
-
};
|
|
1030
|
-
exports.de_GetTelemetryMetadataCommand = de_GetTelemetryMetadataCommand;
|
|
1031
|
-
const de_GetTelemetryMetadataCommandError = async (output, context) => {
|
|
1032
|
-
const parsedOutput = {
|
|
1033
|
-
...output,
|
|
1034
|
-
body: await parseErrorBody(output.body, context),
|
|
1035
|
-
};
|
|
1036
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1037
|
-
switch (errorCode) {
|
|
1038
|
-
case "AccessDeniedException":
|
|
1039
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
1040
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1041
|
-
case "InternalException":
|
|
1042
|
-
case "com.amazonaws.inspector#InternalException":
|
|
1043
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
1044
|
-
case "InvalidInputException":
|
|
1045
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
1046
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
1047
|
-
case "NoSuchEntityException":
|
|
1048
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
1049
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
1050
|
-
default:
|
|
1051
|
-
const parsedBody = parsedOutput.body;
|
|
1052
|
-
return throwDefaultError({
|
|
1053
|
-
output,
|
|
1054
|
-
parsedBody,
|
|
1055
|
-
errorCode,
|
|
1056
|
-
});
|
|
1057
|
-
}
|
|
1058
|
-
};
|
|
1059
|
-
const de_ListAssessmentRunAgentsCommand = async (output, context) => {
|
|
1060
|
-
if (output.statusCode >= 300) {
|
|
1061
|
-
return de_ListAssessmentRunAgentsCommandError(output, context);
|
|
1062
|
-
}
|
|
1063
|
-
const data = await parseBody(output.body, context);
|
|
1064
|
-
let contents = {};
|
|
1065
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1066
|
-
const response = {
|
|
1067
|
-
$metadata: deserializeMetadata(output),
|
|
1068
|
-
...contents,
|
|
1069
|
-
};
|
|
1070
|
-
return response;
|
|
1071
|
-
};
|
|
1072
|
-
exports.de_ListAssessmentRunAgentsCommand = de_ListAssessmentRunAgentsCommand;
|
|
1073
|
-
const de_ListAssessmentRunAgentsCommandError = async (output, context) => {
|
|
1074
|
-
const parsedOutput = {
|
|
1075
|
-
...output,
|
|
1076
|
-
body: await parseErrorBody(output.body, context),
|
|
1077
|
-
};
|
|
1078
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1079
|
-
switch (errorCode) {
|
|
1080
|
-
case "AccessDeniedException":
|
|
1081
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
1082
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1083
|
-
case "InternalException":
|
|
1084
|
-
case "com.amazonaws.inspector#InternalException":
|
|
1085
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
1086
|
-
case "InvalidInputException":
|
|
1087
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
1088
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
1089
|
-
case "NoSuchEntityException":
|
|
1090
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
1091
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
1092
|
-
default:
|
|
1093
|
-
const parsedBody = parsedOutput.body;
|
|
1094
|
-
return throwDefaultError({
|
|
1095
|
-
output,
|
|
1096
|
-
parsedBody,
|
|
1097
|
-
errorCode,
|
|
1098
|
-
});
|
|
1099
|
-
}
|
|
1100
|
-
};
|
|
1101
|
-
const de_ListAssessmentRunsCommand = async (output, context) => {
|
|
1102
|
-
if (output.statusCode >= 300) {
|
|
1103
|
-
return de_ListAssessmentRunsCommandError(output, context);
|
|
1104
|
-
}
|
|
1105
|
-
const data = await parseBody(output.body, context);
|
|
1106
|
-
let contents = {};
|
|
1107
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1108
|
-
const response = {
|
|
1109
|
-
$metadata: deserializeMetadata(output),
|
|
1110
|
-
...contents,
|
|
1111
|
-
};
|
|
1112
|
-
return response;
|
|
1113
|
-
};
|
|
1114
|
-
exports.de_ListAssessmentRunsCommand = de_ListAssessmentRunsCommand;
|
|
1115
|
-
const de_ListAssessmentRunsCommandError = async (output, context) => {
|
|
1116
|
-
const parsedOutput = {
|
|
1117
|
-
...output,
|
|
1118
|
-
body: await parseErrorBody(output.body, context),
|
|
1119
|
-
};
|
|
1120
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1121
|
-
switch (errorCode) {
|
|
1122
|
-
case "AccessDeniedException":
|
|
1123
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
1124
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1125
|
-
case "InternalException":
|
|
1126
|
-
case "com.amazonaws.inspector#InternalException":
|
|
1127
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
1128
|
-
case "InvalidInputException":
|
|
1129
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
1130
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
1131
|
-
case "NoSuchEntityException":
|
|
1132
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
1133
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
1134
|
-
default:
|
|
1135
|
-
const parsedBody = parsedOutput.body;
|
|
1136
|
-
return throwDefaultError({
|
|
1137
|
-
output,
|
|
1138
|
-
parsedBody,
|
|
1139
|
-
errorCode,
|
|
1140
|
-
});
|
|
1141
|
-
}
|
|
1142
|
-
};
|
|
1143
|
-
const de_ListAssessmentTargetsCommand = async (output, context) => {
|
|
1144
|
-
if (output.statusCode >= 300) {
|
|
1145
|
-
return de_ListAssessmentTargetsCommandError(output, context);
|
|
1146
|
-
}
|
|
1147
|
-
const data = await parseBody(output.body, context);
|
|
1148
|
-
let contents = {};
|
|
1149
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1150
|
-
const response = {
|
|
1151
|
-
$metadata: deserializeMetadata(output),
|
|
1152
|
-
...contents,
|
|
1153
|
-
};
|
|
1154
|
-
return response;
|
|
1155
|
-
};
|
|
1156
|
-
exports.de_ListAssessmentTargetsCommand = de_ListAssessmentTargetsCommand;
|
|
1157
|
-
const de_ListAssessmentTargetsCommandError = async (output, context) => {
|
|
1158
|
-
const parsedOutput = {
|
|
1159
|
-
...output,
|
|
1160
|
-
body: await parseErrorBody(output.body, context),
|
|
1161
|
-
};
|
|
1162
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1163
|
-
switch (errorCode) {
|
|
1164
|
-
case "AccessDeniedException":
|
|
1165
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
1166
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1167
|
-
case "InternalException":
|
|
1168
|
-
case "com.amazonaws.inspector#InternalException":
|
|
1169
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
1170
|
-
case "InvalidInputException":
|
|
1171
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
1172
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
1173
|
-
default:
|
|
1174
|
-
const parsedBody = parsedOutput.body;
|
|
1175
|
-
return throwDefaultError({
|
|
1176
|
-
output,
|
|
1177
|
-
parsedBody,
|
|
1178
|
-
errorCode,
|
|
1179
|
-
});
|
|
1180
|
-
}
|
|
1181
|
-
};
|
|
1182
|
-
const de_ListAssessmentTemplatesCommand = async (output, context) => {
|
|
1183
|
-
if (output.statusCode >= 300) {
|
|
1184
|
-
return de_ListAssessmentTemplatesCommandError(output, context);
|
|
1185
|
-
}
|
|
1186
|
-
const data = await parseBody(output.body, context);
|
|
1187
|
-
let contents = {};
|
|
1188
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1189
|
-
const response = {
|
|
1190
|
-
$metadata: deserializeMetadata(output),
|
|
1191
|
-
...contents,
|
|
1192
|
-
};
|
|
1193
|
-
return response;
|
|
1194
|
-
};
|
|
1195
|
-
exports.de_ListAssessmentTemplatesCommand = de_ListAssessmentTemplatesCommand;
|
|
1196
|
-
const de_ListAssessmentTemplatesCommandError = async (output, context) => {
|
|
1197
|
-
const parsedOutput = {
|
|
1198
|
-
...output,
|
|
1199
|
-
body: await parseErrorBody(output.body, context),
|
|
1200
|
-
};
|
|
1201
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1202
|
-
switch (errorCode) {
|
|
1203
|
-
case "AccessDeniedException":
|
|
1204
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
1205
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1206
|
-
case "InternalException":
|
|
1207
|
-
case "com.amazonaws.inspector#InternalException":
|
|
1208
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
1209
|
-
case "InvalidInputException":
|
|
1210
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
1211
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
1212
|
-
case "NoSuchEntityException":
|
|
1213
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
1214
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
1215
|
-
default:
|
|
1216
|
-
const parsedBody = parsedOutput.body;
|
|
1217
|
-
return throwDefaultError({
|
|
1218
|
-
output,
|
|
1219
|
-
parsedBody,
|
|
1220
|
-
errorCode,
|
|
1221
|
-
});
|
|
1222
|
-
}
|
|
1223
|
-
};
|
|
1224
|
-
const de_ListEventSubscriptionsCommand = async (output, context) => {
|
|
1225
|
-
if (output.statusCode >= 300) {
|
|
1226
|
-
return de_ListEventSubscriptionsCommandError(output, context);
|
|
1227
|
-
}
|
|
1228
|
-
const data = await parseBody(output.body, context);
|
|
1229
|
-
let contents = {};
|
|
1230
|
-
contents = de_ListEventSubscriptionsResponse(data, context);
|
|
1231
|
-
const response = {
|
|
1232
|
-
$metadata: deserializeMetadata(output),
|
|
1233
|
-
...contents,
|
|
1234
|
-
};
|
|
1235
|
-
return response;
|
|
1236
|
-
};
|
|
1237
|
-
exports.de_ListEventSubscriptionsCommand = de_ListEventSubscriptionsCommand;
|
|
1238
|
-
const de_ListEventSubscriptionsCommandError = async (output, context) => {
|
|
1239
|
-
const parsedOutput = {
|
|
1240
|
-
...output,
|
|
1241
|
-
body: await parseErrorBody(output.body, context),
|
|
1242
|
-
};
|
|
1243
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1244
|
-
switch (errorCode) {
|
|
1245
|
-
case "AccessDeniedException":
|
|
1246
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
1247
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1248
|
-
case "InternalException":
|
|
1249
|
-
case "com.amazonaws.inspector#InternalException":
|
|
1250
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
1251
|
-
case "InvalidInputException":
|
|
1252
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
1253
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
1254
|
-
case "NoSuchEntityException":
|
|
1255
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
1256
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
1257
|
-
default:
|
|
1258
|
-
const parsedBody = parsedOutput.body;
|
|
1259
|
-
return throwDefaultError({
|
|
1260
|
-
output,
|
|
1261
|
-
parsedBody,
|
|
1262
|
-
errorCode,
|
|
1263
|
-
});
|
|
1264
|
-
}
|
|
1265
|
-
};
|
|
1266
|
-
const de_ListExclusionsCommand = async (output, context) => {
|
|
1267
|
-
if (output.statusCode >= 300) {
|
|
1268
|
-
return de_ListExclusionsCommandError(output, context);
|
|
1269
|
-
}
|
|
1270
|
-
const data = await parseBody(output.body, context);
|
|
1271
|
-
let contents = {};
|
|
1272
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1273
|
-
const response = {
|
|
1274
|
-
$metadata: deserializeMetadata(output),
|
|
1275
|
-
...contents,
|
|
1276
|
-
};
|
|
1277
|
-
return response;
|
|
1278
|
-
};
|
|
1279
|
-
exports.de_ListExclusionsCommand = de_ListExclusionsCommand;
|
|
1280
|
-
const de_ListExclusionsCommandError = async (output, context) => {
|
|
1281
|
-
const parsedOutput = {
|
|
1282
|
-
...output,
|
|
1283
|
-
body: await parseErrorBody(output.body, context),
|
|
1284
|
-
};
|
|
1285
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1286
|
-
switch (errorCode) {
|
|
1287
|
-
case "AccessDeniedException":
|
|
1288
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
1289
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1290
|
-
case "InternalException":
|
|
1291
|
-
case "com.amazonaws.inspector#InternalException":
|
|
1292
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
1293
|
-
case "InvalidInputException":
|
|
1294
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
1295
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
1296
|
-
case "NoSuchEntityException":
|
|
1297
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
1298
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
1299
|
-
default:
|
|
1300
|
-
const parsedBody = parsedOutput.body;
|
|
1301
|
-
return throwDefaultError({
|
|
1302
|
-
output,
|
|
1303
|
-
parsedBody,
|
|
1304
|
-
errorCode,
|
|
1305
|
-
});
|
|
1306
|
-
}
|
|
1307
|
-
};
|
|
1308
|
-
const de_ListFindingsCommand = async (output, context) => {
|
|
1309
|
-
if (output.statusCode >= 300) {
|
|
1310
|
-
return de_ListFindingsCommandError(output, context);
|
|
1311
|
-
}
|
|
1312
|
-
const data = await parseBody(output.body, context);
|
|
1313
|
-
let contents = {};
|
|
1314
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1315
|
-
const response = {
|
|
1316
|
-
$metadata: deserializeMetadata(output),
|
|
1317
|
-
...contents,
|
|
1318
|
-
};
|
|
1319
|
-
return response;
|
|
1320
|
-
};
|
|
1321
|
-
exports.de_ListFindingsCommand = de_ListFindingsCommand;
|
|
1322
|
-
const de_ListFindingsCommandError = async (output, context) => {
|
|
1323
|
-
const parsedOutput = {
|
|
1324
|
-
...output,
|
|
1325
|
-
body: await parseErrorBody(output.body, context),
|
|
1326
|
-
};
|
|
1327
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1328
|
-
switch (errorCode) {
|
|
1329
|
-
case "AccessDeniedException":
|
|
1330
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
1331
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1332
|
-
case "InternalException":
|
|
1333
|
-
case "com.amazonaws.inspector#InternalException":
|
|
1334
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
1335
|
-
case "InvalidInputException":
|
|
1336
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
1337
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
1338
|
-
case "NoSuchEntityException":
|
|
1339
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
1340
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
1341
|
-
default:
|
|
1342
|
-
const parsedBody = parsedOutput.body;
|
|
1343
|
-
return throwDefaultError({
|
|
1344
|
-
output,
|
|
1345
|
-
parsedBody,
|
|
1346
|
-
errorCode,
|
|
1347
|
-
});
|
|
1348
|
-
}
|
|
1349
|
-
};
|
|
1350
|
-
const de_ListRulesPackagesCommand = async (output, context) => {
|
|
1351
|
-
if (output.statusCode >= 300) {
|
|
1352
|
-
return de_ListRulesPackagesCommandError(output, context);
|
|
1353
|
-
}
|
|
1354
|
-
const data = await parseBody(output.body, context);
|
|
1355
|
-
let contents = {};
|
|
1356
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1357
|
-
const response = {
|
|
1358
|
-
$metadata: deserializeMetadata(output),
|
|
1359
|
-
...contents,
|
|
1360
|
-
};
|
|
1361
|
-
return response;
|
|
1362
|
-
};
|
|
1363
|
-
exports.de_ListRulesPackagesCommand = de_ListRulesPackagesCommand;
|
|
1364
|
-
const de_ListRulesPackagesCommandError = async (output, context) => {
|
|
1365
|
-
const parsedOutput = {
|
|
1366
|
-
...output,
|
|
1367
|
-
body: await parseErrorBody(output.body, context),
|
|
1368
|
-
};
|
|
1369
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1370
|
-
switch (errorCode) {
|
|
1371
|
-
case "AccessDeniedException":
|
|
1372
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
1373
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1374
|
-
case "InternalException":
|
|
1375
|
-
case "com.amazonaws.inspector#InternalException":
|
|
1376
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
1377
|
-
case "InvalidInputException":
|
|
1378
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
1379
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
1380
|
-
default:
|
|
1381
|
-
const parsedBody = parsedOutput.body;
|
|
1382
|
-
return throwDefaultError({
|
|
1383
|
-
output,
|
|
1384
|
-
parsedBody,
|
|
1385
|
-
errorCode,
|
|
1386
|
-
});
|
|
1387
|
-
}
|
|
1388
|
-
};
|
|
1389
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
1390
|
-
if (output.statusCode >= 300) {
|
|
1391
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
1392
|
-
}
|
|
1393
|
-
const data = await parseBody(output.body, context);
|
|
1394
|
-
let contents = {};
|
|
1395
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1396
|
-
const response = {
|
|
1397
|
-
$metadata: deserializeMetadata(output),
|
|
1398
|
-
...contents,
|
|
1399
|
-
};
|
|
1400
|
-
return response;
|
|
1401
|
-
};
|
|
1402
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
1403
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
1404
|
-
const parsedOutput = {
|
|
1405
|
-
...output,
|
|
1406
|
-
body: await parseErrorBody(output.body, context),
|
|
1407
|
-
};
|
|
1408
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1409
|
-
switch (errorCode) {
|
|
1410
|
-
case "AccessDeniedException":
|
|
1411
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
1412
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1413
|
-
case "InternalException":
|
|
1414
|
-
case "com.amazonaws.inspector#InternalException":
|
|
1415
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
1416
|
-
case "InvalidInputException":
|
|
1417
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
1418
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
1419
|
-
case "NoSuchEntityException":
|
|
1420
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
1421
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
1422
|
-
default:
|
|
1423
|
-
const parsedBody = parsedOutput.body;
|
|
1424
|
-
return throwDefaultError({
|
|
1425
|
-
output,
|
|
1426
|
-
parsedBody,
|
|
1427
|
-
errorCode,
|
|
1428
|
-
});
|
|
1429
|
-
}
|
|
1430
|
-
};
|
|
1431
|
-
const de_PreviewAgentsCommand = async (output, context) => {
|
|
1432
|
-
if (output.statusCode >= 300) {
|
|
1433
|
-
return de_PreviewAgentsCommandError(output, context);
|
|
1434
|
-
}
|
|
1435
|
-
const data = await parseBody(output.body, context);
|
|
1436
|
-
let contents = {};
|
|
1437
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1438
|
-
const response = {
|
|
1439
|
-
$metadata: deserializeMetadata(output),
|
|
1440
|
-
...contents,
|
|
1441
|
-
};
|
|
1442
|
-
return response;
|
|
1443
|
-
};
|
|
1444
|
-
exports.de_PreviewAgentsCommand = de_PreviewAgentsCommand;
|
|
1445
|
-
const de_PreviewAgentsCommandError = async (output, context) => {
|
|
1446
|
-
const parsedOutput = {
|
|
1447
|
-
...output,
|
|
1448
|
-
body: await parseErrorBody(output.body, context),
|
|
1449
|
-
};
|
|
1450
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1451
|
-
switch (errorCode) {
|
|
1452
|
-
case "AccessDeniedException":
|
|
1453
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
1454
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1455
|
-
case "InternalException":
|
|
1456
|
-
case "com.amazonaws.inspector#InternalException":
|
|
1457
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
1458
|
-
case "InvalidCrossAccountRoleException":
|
|
1459
|
-
case "com.amazonaws.inspector#InvalidCrossAccountRoleException":
|
|
1460
|
-
throw await de_InvalidCrossAccountRoleExceptionRes(parsedOutput, context);
|
|
1461
|
-
case "InvalidInputException":
|
|
1462
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
1463
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
1464
|
-
case "NoSuchEntityException":
|
|
1465
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
1466
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
1467
|
-
default:
|
|
1468
|
-
const parsedBody = parsedOutput.body;
|
|
1469
|
-
return throwDefaultError({
|
|
1470
|
-
output,
|
|
1471
|
-
parsedBody,
|
|
1472
|
-
errorCode,
|
|
1473
|
-
});
|
|
1474
|
-
}
|
|
1475
|
-
};
|
|
1476
|
-
const de_RegisterCrossAccountAccessRoleCommand = async (output, context) => {
|
|
1477
|
-
if (output.statusCode >= 300) {
|
|
1478
|
-
return de_RegisterCrossAccountAccessRoleCommandError(output, context);
|
|
1479
|
-
}
|
|
1480
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1481
|
-
const response = {
|
|
1482
|
-
$metadata: deserializeMetadata(output),
|
|
1483
|
-
};
|
|
1484
|
-
return response;
|
|
1485
|
-
};
|
|
1486
|
-
exports.de_RegisterCrossAccountAccessRoleCommand = de_RegisterCrossAccountAccessRoleCommand;
|
|
1487
|
-
const de_RegisterCrossAccountAccessRoleCommandError = async (output, context) => {
|
|
1488
|
-
const parsedOutput = {
|
|
1489
|
-
...output,
|
|
1490
|
-
body: await parseErrorBody(output.body, context),
|
|
1491
|
-
};
|
|
1492
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1493
|
-
switch (errorCode) {
|
|
1494
|
-
case "AccessDeniedException":
|
|
1495
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
1496
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1497
|
-
case "InternalException":
|
|
1498
|
-
case "com.amazonaws.inspector#InternalException":
|
|
1499
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
1500
|
-
case "InvalidCrossAccountRoleException":
|
|
1501
|
-
case "com.amazonaws.inspector#InvalidCrossAccountRoleException":
|
|
1502
|
-
throw await de_InvalidCrossAccountRoleExceptionRes(parsedOutput, context);
|
|
1503
|
-
case "InvalidInputException":
|
|
1504
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
1505
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
1506
|
-
case "ServiceTemporarilyUnavailableException":
|
|
1507
|
-
case "com.amazonaws.inspector#ServiceTemporarilyUnavailableException":
|
|
1508
|
-
throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context);
|
|
1509
|
-
default:
|
|
1510
|
-
const parsedBody = parsedOutput.body;
|
|
1511
|
-
return throwDefaultError({
|
|
1512
|
-
output,
|
|
1513
|
-
parsedBody,
|
|
1514
|
-
errorCode,
|
|
1515
|
-
});
|
|
1516
|
-
}
|
|
1517
|
-
};
|
|
1518
|
-
const de_RemoveAttributesFromFindingsCommand = async (output, context) => {
|
|
1519
|
-
if (output.statusCode >= 300) {
|
|
1520
|
-
return de_RemoveAttributesFromFindingsCommandError(output, context);
|
|
1521
|
-
}
|
|
1522
|
-
const data = await parseBody(output.body, context);
|
|
1523
|
-
let contents = {};
|
|
1524
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1525
|
-
const response = {
|
|
1526
|
-
$metadata: deserializeMetadata(output),
|
|
1527
|
-
...contents,
|
|
1528
|
-
};
|
|
1529
|
-
return response;
|
|
1530
|
-
};
|
|
1531
|
-
exports.de_RemoveAttributesFromFindingsCommand = de_RemoveAttributesFromFindingsCommand;
|
|
1532
|
-
const de_RemoveAttributesFromFindingsCommandError = async (output, context) => {
|
|
1533
|
-
const parsedOutput = {
|
|
1534
|
-
...output,
|
|
1535
|
-
body: await parseErrorBody(output.body, context),
|
|
1536
|
-
};
|
|
1537
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1538
|
-
switch (errorCode) {
|
|
1539
|
-
case "AccessDeniedException":
|
|
1540
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
1541
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1542
|
-
case "InternalException":
|
|
1543
|
-
case "com.amazonaws.inspector#InternalException":
|
|
1544
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
1545
|
-
case "InvalidInputException":
|
|
1546
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
1547
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
1548
|
-
case "NoSuchEntityException":
|
|
1549
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
1550
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
1551
|
-
case "ServiceTemporarilyUnavailableException":
|
|
1552
|
-
case "com.amazonaws.inspector#ServiceTemporarilyUnavailableException":
|
|
1553
|
-
throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context);
|
|
1554
|
-
default:
|
|
1555
|
-
const parsedBody = parsedOutput.body;
|
|
1556
|
-
return throwDefaultError({
|
|
1557
|
-
output,
|
|
1558
|
-
parsedBody,
|
|
1559
|
-
errorCode,
|
|
1560
|
-
});
|
|
1561
|
-
}
|
|
1562
|
-
};
|
|
1563
|
-
const de_SetTagsForResourceCommand = async (output, context) => {
|
|
1564
|
-
if (output.statusCode >= 300) {
|
|
1565
|
-
return de_SetTagsForResourceCommandError(output, context);
|
|
1566
|
-
}
|
|
1567
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1568
|
-
const response = {
|
|
1569
|
-
$metadata: deserializeMetadata(output),
|
|
1570
|
-
};
|
|
1571
|
-
return response;
|
|
1572
|
-
};
|
|
1573
|
-
exports.de_SetTagsForResourceCommand = de_SetTagsForResourceCommand;
|
|
1574
|
-
const de_SetTagsForResourceCommandError = async (output, context) => {
|
|
1575
|
-
const parsedOutput = {
|
|
1576
|
-
...output,
|
|
1577
|
-
body: await parseErrorBody(output.body, context),
|
|
1578
|
-
};
|
|
1579
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1580
|
-
switch (errorCode) {
|
|
1581
|
-
case "AccessDeniedException":
|
|
1582
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
1583
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1584
|
-
case "InternalException":
|
|
1585
|
-
case "com.amazonaws.inspector#InternalException":
|
|
1586
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
1587
|
-
case "InvalidInputException":
|
|
1588
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
1589
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
1590
|
-
case "NoSuchEntityException":
|
|
1591
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
1592
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
1593
|
-
case "ServiceTemporarilyUnavailableException":
|
|
1594
|
-
case "com.amazonaws.inspector#ServiceTemporarilyUnavailableException":
|
|
1595
|
-
throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context);
|
|
1596
|
-
default:
|
|
1597
|
-
const parsedBody = parsedOutput.body;
|
|
1598
|
-
return throwDefaultError({
|
|
1599
|
-
output,
|
|
1600
|
-
parsedBody,
|
|
1601
|
-
errorCode,
|
|
1602
|
-
});
|
|
1603
|
-
}
|
|
1604
|
-
};
|
|
1605
|
-
const de_StartAssessmentRunCommand = async (output, context) => {
|
|
1606
|
-
if (output.statusCode >= 300) {
|
|
1607
|
-
return de_StartAssessmentRunCommandError(output, context);
|
|
1608
|
-
}
|
|
1609
|
-
const data = await parseBody(output.body, context);
|
|
1610
|
-
let contents = {};
|
|
1611
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1612
|
-
const response = {
|
|
1613
|
-
$metadata: deserializeMetadata(output),
|
|
1614
|
-
...contents,
|
|
1615
|
-
};
|
|
1616
|
-
return response;
|
|
1617
|
-
};
|
|
1618
|
-
exports.de_StartAssessmentRunCommand = de_StartAssessmentRunCommand;
|
|
1619
|
-
const de_StartAssessmentRunCommandError = async (output, context) => {
|
|
1620
|
-
const parsedOutput = {
|
|
1621
|
-
...output,
|
|
1622
|
-
body: await parseErrorBody(output.body, context),
|
|
1623
|
-
};
|
|
1624
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1625
|
-
switch (errorCode) {
|
|
1626
|
-
case "AccessDeniedException":
|
|
1627
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
1628
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1629
|
-
case "AgentsAlreadyRunningAssessmentException":
|
|
1630
|
-
case "com.amazonaws.inspector#AgentsAlreadyRunningAssessmentException":
|
|
1631
|
-
throw await de_AgentsAlreadyRunningAssessmentExceptionRes(parsedOutput, context);
|
|
1632
|
-
case "InternalException":
|
|
1633
|
-
case "com.amazonaws.inspector#InternalException":
|
|
1634
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
1635
|
-
case "InvalidCrossAccountRoleException":
|
|
1636
|
-
case "com.amazonaws.inspector#InvalidCrossAccountRoleException":
|
|
1637
|
-
throw await de_InvalidCrossAccountRoleExceptionRes(parsedOutput, context);
|
|
1638
|
-
case "InvalidInputException":
|
|
1639
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
1640
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
1641
|
-
case "LimitExceededException":
|
|
1642
|
-
case "com.amazonaws.inspector#LimitExceededException":
|
|
1643
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
1644
|
-
case "NoSuchEntityException":
|
|
1645
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
1646
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
1647
|
-
case "ServiceTemporarilyUnavailableException":
|
|
1648
|
-
case "com.amazonaws.inspector#ServiceTemporarilyUnavailableException":
|
|
1649
|
-
throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context);
|
|
1650
|
-
default:
|
|
1651
|
-
const parsedBody = parsedOutput.body;
|
|
1652
|
-
return throwDefaultError({
|
|
1653
|
-
output,
|
|
1654
|
-
parsedBody,
|
|
1655
|
-
errorCode,
|
|
1656
|
-
});
|
|
1657
|
-
}
|
|
1658
|
-
};
|
|
1659
|
-
const de_StopAssessmentRunCommand = async (output, context) => {
|
|
1660
|
-
if (output.statusCode >= 300) {
|
|
1661
|
-
return de_StopAssessmentRunCommandError(output, context);
|
|
1662
|
-
}
|
|
1663
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1664
|
-
const response = {
|
|
1665
|
-
$metadata: deserializeMetadata(output),
|
|
1666
|
-
};
|
|
1667
|
-
return response;
|
|
1668
|
-
};
|
|
1669
|
-
exports.de_StopAssessmentRunCommand = de_StopAssessmentRunCommand;
|
|
1670
|
-
const de_StopAssessmentRunCommandError = async (output, context) => {
|
|
1671
|
-
const parsedOutput = {
|
|
1672
|
-
...output,
|
|
1673
|
-
body: await parseErrorBody(output.body, context),
|
|
1674
|
-
};
|
|
1675
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1676
|
-
switch (errorCode) {
|
|
1677
|
-
case "AccessDeniedException":
|
|
1678
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
1679
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1680
|
-
case "InternalException":
|
|
1681
|
-
case "com.amazonaws.inspector#InternalException":
|
|
1682
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
1683
|
-
case "InvalidInputException":
|
|
1684
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
1685
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
1686
|
-
case "NoSuchEntityException":
|
|
1687
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
1688
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
1689
|
-
case "ServiceTemporarilyUnavailableException":
|
|
1690
|
-
case "com.amazonaws.inspector#ServiceTemporarilyUnavailableException":
|
|
1691
|
-
throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context);
|
|
1692
|
-
default:
|
|
1693
|
-
const parsedBody = parsedOutput.body;
|
|
1694
|
-
return throwDefaultError({
|
|
1695
|
-
output,
|
|
1696
|
-
parsedBody,
|
|
1697
|
-
errorCode,
|
|
1698
|
-
});
|
|
1699
|
-
}
|
|
1700
|
-
};
|
|
1701
|
-
const de_SubscribeToEventCommand = async (output, context) => {
|
|
1702
|
-
if (output.statusCode >= 300) {
|
|
1703
|
-
return de_SubscribeToEventCommandError(output, context);
|
|
1704
|
-
}
|
|
1705
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1706
|
-
const response = {
|
|
1707
|
-
$metadata: deserializeMetadata(output),
|
|
1708
|
-
};
|
|
1709
|
-
return response;
|
|
1710
|
-
};
|
|
1711
|
-
exports.de_SubscribeToEventCommand = de_SubscribeToEventCommand;
|
|
1712
|
-
const de_SubscribeToEventCommandError = async (output, context) => {
|
|
1713
|
-
const parsedOutput = {
|
|
1714
|
-
...output,
|
|
1715
|
-
body: await parseErrorBody(output.body, context),
|
|
1716
|
-
};
|
|
1717
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1718
|
-
switch (errorCode) {
|
|
1719
|
-
case "AccessDeniedException":
|
|
1720
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
1721
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1722
|
-
case "InternalException":
|
|
1723
|
-
case "com.amazonaws.inspector#InternalException":
|
|
1724
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
1725
|
-
case "InvalidInputException":
|
|
1726
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
1727
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
1728
|
-
case "LimitExceededException":
|
|
1729
|
-
case "com.amazonaws.inspector#LimitExceededException":
|
|
1730
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
1731
|
-
case "NoSuchEntityException":
|
|
1732
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
1733
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
1734
|
-
case "ServiceTemporarilyUnavailableException":
|
|
1735
|
-
case "com.amazonaws.inspector#ServiceTemporarilyUnavailableException":
|
|
1736
|
-
throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context);
|
|
1737
|
-
default:
|
|
1738
|
-
const parsedBody = parsedOutput.body;
|
|
1739
|
-
return throwDefaultError({
|
|
1740
|
-
output,
|
|
1741
|
-
parsedBody,
|
|
1742
|
-
errorCode,
|
|
1743
|
-
});
|
|
1744
|
-
}
|
|
1745
|
-
};
|
|
1746
|
-
const de_UnsubscribeFromEventCommand = async (output, context) => {
|
|
1747
|
-
if (output.statusCode >= 300) {
|
|
1748
|
-
return de_UnsubscribeFromEventCommandError(output, context);
|
|
1749
|
-
}
|
|
1750
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1751
|
-
const response = {
|
|
1752
|
-
$metadata: deserializeMetadata(output),
|
|
1753
|
-
};
|
|
1754
|
-
return response;
|
|
1755
|
-
};
|
|
1756
|
-
exports.de_UnsubscribeFromEventCommand = de_UnsubscribeFromEventCommand;
|
|
1757
|
-
const de_UnsubscribeFromEventCommandError = async (output, context) => {
|
|
1758
|
-
const parsedOutput = {
|
|
1759
|
-
...output,
|
|
1760
|
-
body: await parseErrorBody(output.body, context),
|
|
1761
|
-
};
|
|
1762
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1763
|
-
switch (errorCode) {
|
|
1764
|
-
case "AccessDeniedException":
|
|
1765
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
1766
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1767
|
-
case "InternalException":
|
|
1768
|
-
case "com.amazonaws.inspector#InternalException":
|
|
1769
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
1770
|
-
case "InvalidInputException":
|
|
1771
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
1772
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
1773
|
-
case "NoSuchEntityException":
|
|
1774
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
1775
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
1776
|
-
case "ServiceTemporarilyUnavailableException":
|
|
1777
|
-
case "com.amazonaws.inspector#ServiceTemporarilyUnavailableException":
|
|
1778
|
-
throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context);
|
|
1779
|
-
default:
|
|
1780
|
-
const parsedBody = parsedOutput.body;
|
|
1781
|
-
return throwDefaultError({
|
|
1782
|
-
output,
|
|
1783
|
-
parsedBody,
|
|
1784
|
-
errorCode,
|
|
1785
|
-
});
|
|
1786
|
-
}
|
|
1787
|
-
};
|
|
1788
|
-
const de_UpdateAssessmentTargetCommand = async (output, context) => {
|
|
1789
|
-
if (output.statusCode >= 300) {
|
|
1790
|
-
return de_UpdateAssessmentTargetCommandError(output, context);
|
|
1791
|
-
}
|
|
1792
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1793
|
-
const response = {
|
|
1794
|
-
$metadata: deserializeMetadata(output),
|
|
1795
|
-
};
|
|
1796
|
-
return response;
|
|
1797
|
-
};
|
|
1798
|
-
exports.de_UpdateAssessmentTargetCommand = de_UpdateAssessmentTargetCommand;
|
|
1799
|
-
const de_UpdateAssessmentTargetCommandError = async (output, context) => {
|
|
1800
|
-
const parsedOutput = {
|
|
1801
|
-
...output,
|
|
1802
|
-
body: await parseErrorBody(output.body, context),
|
|
1803
|
-
};
|
|
1804
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1805
|
-
switch (errorCode) {
|
|
1806
|
-
case "AccessDeniedException":
|
|
1807
|
-
case "com.amazonaws.inspector#AccessDeniedException":
|
|
1808
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1809
|
-
case "InternalException":
|
|
1810
|
-
case "com.amazonaws.inspector#InternalException":
|
|
1811
|
-
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
1812
|
-
case "InvalidInputException":
|
|
1813
|
-
case "com.amazonaws.inspector#InvalidInputException":
|
|
1814
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
1815
|
-
case "NoSuchEntityException":
|
|
1816
|
-
case "com.amazonaws.inspector#NoSuchEntityException":
|
|
1817
|
-
throw await de_NoSuchEntityExceptionRes(parsedOutput, context);
|
|
1818
|
-
case "ServiceTemporarilyUnavailableException":
|
|
1819
|
-
case "com.amazonaws.inspector#ServiceTemporarilyUnavailableException":
|
|
1820
|
-
throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context);
|
|
1821
|
-
default:
|
|
1822
|
-
const parsedBody = parsedOutput.body;
|
|
1823
|
-
return throwDefaultError({
|
|
1824
|
-
output,
|
|
1825
|
-
parsedBody,
|
|
1826
|
-
errorCode,
|
|
1827
|
-
});
|
|
1828
|
-
}
|
|
1829
|
-
};
|
|
1830
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
1831
|
-
const body = parsedOutput.body;
|
|
1832
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1833
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
1834
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1835
|
-
...deserialized,
|
|
1836
|
-
});
|
|
1837
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1838
|
-
};
|
|
1839
|
-
const de_AgentsAlreadyRunningAssessmentExceptionRes = async (parsedOutput, context) => {
|
|
1840
|
-
const body = parsedOutput.body;
|
|
1841
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1842
|
-
const exception = new models_0_1.AgentsAlreadyRunningAssessmentException({
|
|
1843
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1844
|
-
...deserialized,
|
|
1845
|
-
});
|
|
1846
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1847
|
-
};
|
|
1848
|
-
const de_AssessmentRunInProgressExceptionRes = async (parsedOutput, context) => {
|
|
1849
|
-
const body = parsedOutput.body;
|
|
1850
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1851
|
-
const exception = new models_0_1.AssessmentRunInProgressException({
|
|
1852
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1853
|
-
...deserialized,
|
|
1854
|
-
});
|
|
1855
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1856
|
-
};
|
|
1857
|
-
const de_InternalExceptionRes = async (parsedOutput, context) => {
|
|
1858
|
-
const body = parsedOutput.body;
|
|
1859
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1860
|
-
const exception = new models_0_1.InternalException({
|
|
1861
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1862
|
-
...deserialized,
|
|
1863
|
-
});
|
|
1864
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1865
|
-
};
|
|
1866
|
-
const de_InvalidCrossAccountRoleExceptionRes = async (parsedOutput, context) => {
|
|
1867
|
-
const body = parsedOutput.body;
|
|
1868
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1869
|
-
const exception = new models_0_1.InvalidCrossAccountRoleException({
|
|
1870
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1871
|
-
...deserialized,
|
|
1872
|
-
});
|
|
1873
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1874
|
-
};
|
|
1875
|
-
const de_InvalidInputExceptionRes = async (parsedOutput, context) => {
|
|
1876
|
-
const body = parsedOutput.body;
|
|
1877
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1878
|
-
const exception = new models_0_1.InvalidInputException({
|
|
1879
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1880
|
-
...deserialized,
|
|
1881
|
-
});
|
|
1882
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1883
|
-
};
|
|
1884
|
-
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
1885
|
-
const body = parsedOutput.body;
|
|
1886
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1887
|
-
const exception = new models_0_1.LimitExceededException({
|
|
1888
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1889
|
-
...deserialized,
|
|
1890
|
-
});
|
|
1891
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1892
|
-
};
|
|
1893
|
-
const de_NoSuchEntityExceptionRes = async (parsedOutput, context) => {
|
|
1894
|
-
const body = parsedOutput.body;
|
|
1895
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1896
|
-
const exception = new models_0_1.NoSuchEntityException({
|
|
1897
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1898
|
-
...deserialized,
|
|
1899
|
-
});
|
|
1900
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1901
|
-
};
|
|
1902
|
-
const de_PreviewGenerationInProgressExceptionRes = async (parsedOutput, context) => {
|
|
1903
|
-
const body = parsedOutput.body;
|
|
1904
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1905
|
-
const exception = new models_0_1.PreviewGenerationInProgressException({
|
|
1906
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1907
|
-
...deserialized,
|
|
1908
|
-
});
|
|
1909
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1910
|
-
};
|
|
1911
|
-
const de_ServiceTemporarilyUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
1912
|
-
const body = parsedOutput.body;
|
|
1913
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1914
|
-
const exception = new models_0_1.ServiceTemporarilyUnavailableException({
|
|
1915
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1916
|
-
...deserialized,
|
|
1917
|
-
});
|
|
1918
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1919
|
-
};
|
|
1920
|
-
const de_UnsupportedFeatureExceptionRes = async (parsedOutput, context) => {
|
|
1921
|
-
const body = parsedOutput.body;
|
|
1922
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
1923
|
-
const exception = new models_0_1.UnsupportedFeatureException({
|
|
1924
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1925
|
-
...deserialized,
|
|
1926
|
-
});
|
|
1927
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1928
|
-
};
|
|
1929
|
-
const se_AssessmentRunFilter = (input, context) => {
|
|
1930
|
-
return (0, smithy_client_1.take)(input, {
|
|
1931
|
-
completionTimeRange: (_) => se_TimestampRange(_, context),
|
|
1932
|
-
durationRange: smithy_client_1._json,
|
|
1933
|
-
namePattern: [],
|
|
1934
|
-
rulesPackageArns: smithy_client_1._json,
|
|
1935
|
-
startTimeRange: (_) => se_TimestampRange(_, context),
|
|
1936
|
-
stateChangeTimeRange: (_) => se_TimestampRange(_, context),
|
|
1937
|
-
states: smithy_client_1._json,
|
|
1938
|
-
});
|
|
1939
|
-
};
|
|
1940
|
-
const se_FindingFilter = (input, context) => {
|
|
1941
|
-
return (0, smithy_client_1.take)(input, {
|
|
1942
|
-
agentIds: smithy_client_1._json,
|
|
1943
|
-
attributes: smithy_client_1._json,
|
|
1944
|
-
autoScalingGroups: smithy_client_1._json,
|
|
1945
|
-
creationTimeRange: (_) => se_TimestampRange(_, context),
|
|
1946
|
-
ruleNames: smithy_client_1._json,
|
|
1947
|
-
rulesPackageArns: smithy_client_1._json,
|
|
1948
|
-
severities: smithy_client_1._json,
|
|
1949
|
-
userAttributes: smithy_client_1._json,
|
|
1950
|
-
});
|
|
1951
|
-
};
|
|
1952
|
-
const se_ListAssessmentRunsRequest = (input, context) => {
|
|
1953
|
-
return (0, smithy_client_1.take)(input, {
|
|
1954
|
-
assessmentTemplateArns: smithy_client_1._json,
|
|
1955
|
-
filter: (_) => se_AssessmentRunFilter(_, context),
|
|
1956
|
-
maxResults: [],
|
|
1957
|
-
nextToken: [],
|
|
1958
|
-
});
|
|
1959
|
-
};
|
|
1960
|
-
const se_ListFindingsRequest = (input, context) => {
|
|
1961
|
-
return (0, smithy_client_1.take)(input, {
|
|
1962
|
-
assessmentRunArns: smithy_client_1._json,
|
|
1963
|
-
filter: (_) => se_FindingFilter(_, context),
|
|
1964
|
-
maxResults: [],
|
|
1965
|
-
nextToken: [],
|
|
1966
|
-
});
|
|
1967
|
-
};
|
|
1968
|
-
const se_TimestampRange = (input, context) => {
|
|
1969
|
-
return (0, smithy_client_1.take)(input, {
|
|
1970
|
-
beginDate: (_) => Math.round(_.getTime() / 1000),
|
|
1971
|
-
endDate: (_) => Math.round(_.getTime() / 1000),
|
|
1972
|
-
});
|
|
1973
|
-
};
|
|
1974
|
-
const de_AssessmentRun = (output, context) => {
|
|
1975
|
-
return (0, smithy_client_1.take)(output, {
|
|
1976
|
-
arn: smithy_client_1.expectString,
|
|
1977
|
-
assessmentTemplateArn: smithy_client_1.expectString,
|
|
1978
|
-
completedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1979
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1980
|
-
dataCollected: smithy_client_1.expectBoolean,
|
|
1981
|
-
durationInSeconds: smithy_client_1.expectInt32,
|
|
1982
|
-
findingCounts: smithy_client_1._json,
|
|
1983
|
-
name: smithy_client_1.expectString,
|
|
1984
|
-
notifications: (_) => de_AssessmentRunNotificationList(_, context),
|
|
1985
|
-
rulesPackageArns: smithy_client_1._json,
|
|
1986
|
-
startedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1987
|
-
state: smithy_client_1.expectString,
|
|
1988
|
-
stateChangedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1989
|
-
stateChanges: (_) => de_AssessmentRunStateChangeList(_, context),
|
|
1990
|
-
userAttributesForFindings: smithy_client_1._json,
|
|
1991
|
-
});
|
|
1992
|
-
};
|
|
1993
|
-
const de_AssessmentRunList = (output, context) => {
|
|
1994
|
-
const retVal = (output || [])
|
|
1995
|
-
.filter((e) => e != null)
|
|
1996
|
-
.map((entry) => {
|
|
1997
|
-
return de_AssessmentRun(entry, context);
|
|
1998
|
-
});
|
|
1999
|
-
return retVal;
|
|
2000
|
-
};
|
|
2001
|
-
const de_AssessmentRunNotification = (output, context) => {
|
|
2002
|
-
return (0, smithy_client_1.take)(output, {
|
|
2003
|
-
date: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2004
|
-
error: smithy_client_1.expectBoolean,
|
|
2005
|
-
event: smithy_client_1.expectString,
|
|
2006
|
-
message: smithy_client_1.expectString,
|
|
2007
|
-
snsPublishStatusCode: smithy_client_1.expectString,
|
|
2008
|
-
snsTopicArn: smithy_client_1.expectString,
|
|
2009
|
-
});
|
|
2010
|
-
};
|
|
2011
|
-
const de_AssessmentRunNotificationList = (output, context) => {
|
|
2012
|
-
const retVal = (output || [])
|
|
2013
|
-
.filter((e) => e != null)
|
|
2014
|
-
.map((entry) => {
|
|
2015
|
-
return de_AssessmentRunNotification(entry, context);
|
|
2016
|
-
});
|
|
2017
|
-
return retVal;
|
|
2018
|
-
};
|
|
2019
|
-
const de_AssessmentRunStateChange = (output, context) => {
|
|
2020
|
-
return (0, smithy_client_1.take)(output, {
|
|
2021
|
-
state: smithy_client_1.expectString,
|
|
2022
|
-
stateChangedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2023
|
-
});
|
|
2024
|
-
};
|
|
2025
|
-
const de_AssessmentRunStateChangeList = (output, context) => {
|
|
2026
|
-
const retVal = (output || [])
|
|
2027
|
-
.filter((e) => e != null)
|
|
2028
|
-
.map((entry) => {
|
|
2029
|
-
return de_AssessmentRunStateChange(entry, context);
|
|
2030
|
-
});
|
|
2031
|
-
return retVal;
|
|
2032
|
-
};
|
|
2033
|
-
const de_AssessmentTarget = (output, context) => {
|
|
2034
|
-
return (0, smithy_client_1.take)(output, {
|
|
2035
|
-
arn: smithy_client_1.expectString,
|
|
2036
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2037
|
-
name: smithy_client_1.expectString,
|
|
2038
|
-
resourceGroupArn: smithy_client_1.expectString,
|
|
2039
|
-
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2040
|
-
});
|
|
2041
|
-
};
|
|
2042
|
-
const de_AssessmentTargetList = (output, context) => {
|
|
2043
|
-
const retVal = (output || [])
|
|
2044
|
-
.filter((e) => e != null)
|
|
2045
|
-
.map((entry) => {
|
|
2046
|
-
return de_AssessmentTarget(entry, context);
|
|
2047
|
-
});
|
|
2048
|
-
return retVal;
|
|
2049
|
-
};
|
|
2050
|
-
const de_AssessmentTemplate = (output, context) => {
|
|
2051
|
-
return (0, smithy_client_1.take)(output, {
|
|
2052
|
-
arn: smithy_client_1.expectString,
|
|
2053
|
-
assessmentRunCount: smithy_client_1.expectInt32,
|
|
2054
|
-
assessmentTargetArn: smithy_client_1.expectString,
|
|
2055
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2056
|
-
durationInSeconds: smithy_client_1.expectInt32,
|
|
2057
|
-
lastAssessmentRunArn: smithy_client_1.expectString,
|
|
2058
|
-
name: smithy_client_1.expectString,
|
|
2059
|
-
rulesPackageArns: smithy_client_1._json,
|
|
2060
|
-
userAttributesForFindings: smithy_client_1._json,
|
|
2061
|
-
});
|
|
2062
|
-
};
|
|
2063
|
-
const de_AssessmentTemplateList = (output, context) => {
|
|
2064
|
-
const retVal = (output || [])
|
|
2065
|
-
.filter((e) => e != null)
|
|
2066
|
-
.map((entry) => {
|
|
2067
|
-
return de_AssessmentTemplate(entry, context);
|
|
2068
|
-
});
|
|
2069
|
-
return retVal;
|
|
2070
|
-
};
|
|
2071
|
-
const de_DescribeAssessmentRunsResponse = (output, context) => {
|
|
2072
|
-
return (0, smithy_client_1.take)(output, {
|
|
2073
|
-
assessmentRuns: (_) => de_AssessmentRunList(_, context),
|
|
2074
|
-
failedItems: smithy_client_1._json,
|
|
2075
|
-
});
|
|
2076
|
-
};
|
|
2077
|
-
const de_DescribeAssessmentTargetsResponse = (output, context) => {
|
|
2078
|
-
return (0, smithy_client_1.take)(output, {
|
|
2079
|
-
assessmentTargets: (_) => de_AssessmentTargetList(_, context),
|
|
2080
|
-
failedItems: smithy_client_1._json,
|
|
2081
|
-
});
|
|
2082
|
-
};
|
|
2083
|
-
const de_DescribeAssessmentTemplatesResponse = (output, context) => {
|
|
2084
|
-
return (0, smithy_client_1.take)(output, {
|
|
2085
|
-
assessmentTemplates: (_) => de_AssessmentTemplateList(_, context),
|
|
2086
|
-
failedItems: smithy_client_1._json,
|
|
2087
|
-
});
|
|
2088
|
-
};
|
|
2089
|
-
const de_DescribeCrossAccountAccessRoleResponse = (output, context) => {
|
|
2090
|
-
return (0, smithy_client_1.take)(output, {
|
|
2091
|
-
registeredAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2092
|
-
roleArn: smithy_client_1.expectString,
|
|
2093
|
-
valid: smithy_client_1.expectBoolean,
|
|
2094
|
-
});
|
|
2095
|
-
};
|
|
2096
|
-
const de_DescribeFindingsResponse = (output, context) => {
|
|
2097
|
-
return (0, smithy_client_1.take)(output, {
|
|
2098
|
-
failedItems: smithy_client_1._json,
|
|
2099
|
-
findings: (_) => de_FindingList(_, context),
|
|
2100
|
-
});
|
|
2101
|
-
};
|
|
2102
|
-
const de_DescribeResourceGroupsResponse = (output, context) => {
|
|
2103
|
-
return (0, smithy_client_1.take)(output, {
|
|
2104
|
-
failedItems: smithy_client_1._json,
|
|
2105
|
-
resourceGroups: (_) => de_ResourceGroupList(_, context),
|
|
2106
|
-
});
|
|
2107
|
-
};
|
|
2108
|
-
const de_EventSubscription = (output, context) => {
|
|
2109
|
-
return (0, smithy_client_1.take)(output, {
|
|
2110
|
-
event: smithy_client_1.expectString,
|
|
2111
|
-
subscribedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2112
|
-
});
|
|
2113
|
-
};
|
|
2114
|
-
const de_EventSubscriptionList = (output, context) => {
|
|
2115
|
-
const retVal = (output || [])
|
|
2116
|
-
.filter((e) => e != null)
|
|
2117
|
-
.map((entry) => {
|
|
2118
|
-
return de_EventSubscription(entry, context);
|
|
2119
|
-
});
|
|
2120
|
-
return retVal;
|
|
2121
|
-
};
|
|
2122
|
-
const de_Finding = (output, context) => {
|
|
2123
|
-
return (0, smithy_client_1.take)(output, {
|
|
2124
|
-
arn: smithy_client_1.expectString,
|
|
2125
|
-
assetAttributes: smithy_client_1._json,
|
|
2126
|
-
assetType: smithy_client_1.expectString,
|
|
2127
|
-
attributes: smithy_client_1._json,
|
|
2128
|
-
confidence: smithy_client_1.expectInt32,
|
|
2129
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2130
|
-
description: smithy_client_1.expectString,
|
|
2131
|
-
id: smithy_client_1.expectString,
|
|
2132
|
-
indicatorOfCompromise: smithy_client_1.expectBoolean,
|
|
2133
|
-
numericSeverity: smithy_client_1.limitedParseDouble,
|
|
2134
|
-
recommendation: smithy_client_1.expectString,
|
|
2135
|
-
schemaVersion: smithy_client_1.expectInt32,
|
|
2136
|
-
service: smithy_client_1.expectString,
|
|
2137
|
-
serviceAttributes: smithy_client_1._json,
|
|
2138
|
-
severity: smithy_client_1.expectString,
|
|
2139
|
-
title: smithy_client_1.expectString,
|
|
2140
|
-
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2141
|
-
userAttributes: smithy_client_1._json,
|
|
2142
|
-
});
|
|
2143
|
-
};
|
|
2144
|
-
const de_FindingList = (output, context) => {
|
|
2145
|
-
const retVal = (output || [])
|
|
2146
|
-
.filter((e) => e != null)
|
|
2147
|
-
.map((entry) => {
|
|
2148
|
-
return de_Finding(entry, context);
|
|
2149
|
-
});
|
|
2150
|
-
return retVal;
|
|
2151
|
-
};
|
|
2152
|
-
const de_ListEventSubscriptionsResponse = (output, context) => {
|
|
2153
|
-
return (0, smithy_client_1.take)(output, {
|
|
2154
|
-
nextToken: smithy_client_1.expectString,
|
|
2155
|
-
subscriptions: (_) => de_SubscriptionList(_, context),
|
|
2156
|
-
});
|
|
2157
|
-
};
|
|
2158
|
-
const de_ResourceGroup = (output, context) => {
|
|
2159
|
-
return (0, smithy_client_1.take)(output, {
|
|
2160
|
-
arn: smithy_client_1.expectString,
|
|
2161
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2162
|
-
tags: smithy_client_1._json,
|
|
2163
|
-
});
|
|
2164
|
-
};
|
|
2165
|
-
const de_ResourceGroupList = (output, context) => {
|
|
2166
|
-
const retVal = (output || [])
|
|
2167
|
-
.filter((e) => e != null)
|
|
2168
|
-
.map((entry) => {
|
|
2169
|
-
return de_ResourceGroup(entry, context);
|
|
2170
|
-
});
|
|
2171
|
-
return retVal;
|
|
2172
|
-
};
|
|
2173
|
-
const de_Subscription = (output, context) => {
|
|
2174
|
-
return (0, smithy_client_1.take)(output, {
|
|
2175
|
-
eventSubscriptions: (_) => de_EventSubscriptionList(_, context),
|
|
2176
|
-
resourceArn: smithy_client_1.expectString,
|
|
2177
|
-
topicArn: smithy_client_1.expectString,
|
|
2178
|
-
});
|
|
2179
|
-
};
|
|
2180
|
-
const de_SubscriptionList = (output, context) => {
|
|
2181
|
-
const retVal = (output || [])
|
|
2182
|
-
.filter((e) => e != null)
|
|
2183
|
-
.map((entry) => {
|
|
2184
|
-
return de_Subscription(entry, context);
|
|
2185
|
-
});
|
|
2186
|
-
return retVal;
|
|
2187
|
-
};
|
|
2188
|
-
const deserializeMetadata = (output) => ({
|
|
2189
|
-
httpStatusCode: output.statusCode,
|
|
2190
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
2191
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
2192
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
2193
|
-
});
|
|
2194
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
2195
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(InspectorServiceException_1.InspectorServiceException);
|
|
2196
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
2197
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
2198
|
-
const contents = {
|
|
2199
|
-
protocol,
|
|
2200
|
-
hostname,
|
|
2201
|
-
port,
|
|
2202
|
-
method: "POST",
|
|
2203
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
2204
|
-
headers,
|
|
2205
|
-
};
|
|
2206
|
-
if (resolvedHostname !== undefined) {
|
|
2207
|
-
contents.hostname = resolvedHostname;
|
|
2208
|
-
}
|
|
2209
|
-
if (body !== undefined) {
|
|
2210
|
-
contents.body = body;
|
|
2211
|
-
}
|
|
2212
|
-
return new protocol_http_1.HttpRequest(contents);
|
|
2213
|
-
};
|
|
2214
|
-
function sharedHeaders(operation) {
|
|
2215
|
-
return {
|
|
2216
|
-
"content-type": "application/x-amz-json-1.1",
|
|
2217
|
-
"x-amz-target": `InspectorService.${operation}`,
|
|
2218
|
-
};
|
|
2219
|
-
}
|
|
2220
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
2221
|
-
if (encoded.length) {
|
|
2222
|
-
return JSON.parse(encoded);
|
|
2223
|
-
}
|
|
2224
|
-
return {};
|
|
2225
|
-
});
|
|
2226
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
2227
|
-
const value = await parseBody(errorBody, context);
|
|
2228
|
-
value.message = value.message ?? value.Message;
|
|
2229
|
-
return value;
|
|
2230
|
-
};
|
|
2231
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
2232
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
2233
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
2234
|
-
let cleanValue = rawValue;
|
|
2235
|
-
if (typeof cleanValue === "number") {
|
|
2236
|
-
cleanValue = cleanValue.toString();
|
|
2237
|
-
}
|
|
2238
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
2239
|
-
cleanValue = cleanValue.split(",")[0];
|
|
2240
|
-
}
|
|
2241
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
2242
|
-
cleanValue = cleanValue.split(":")[0];
|
|
2243
|
-
}
|
|
2244
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
2245
|
-
cleanValue = cleanValue.split("#")[1];
|
|
2246
|
-
}
|
|
2247
|
-
return cleanValue;
|
|
2248
|
-
};
|
|
2249
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
2250
|
-
if (headerKey !== undefined) {
|
|
2251
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
2252
|
-
}
|
|
2253
|
-
if (data.code !== undefined) {
|
|
2254
|
-
return sanitizeErrorCode(data.code);
|
|
2255
|
-
}
|
|
2256
|
-
if (data["__type"] !== undefined) {
|
|
2257
|
-
return sanitizeErrorCode(data["__type"]);
|
|
2258
|
-
}
|
|
2259
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|