@aws-sdk/client-codeguru-security 3.474.0 → 3.477.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,38 +2,31 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.de_UpdateAccountConfigurationCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListTagsForResourceCommand = exports.de_ListScansCommand = exports.de_ListFindingsMetricsCommand = exports.de_GetScanCommand = exports.de_GetMetricsSummaryCommand = exports.de_GetFindingsCommand = exports.de_GetAccountConfigurationCommand = exports.de_CreateUploadUrlCommand = exports.de_CreateScanCommand = exports.de_BatchGetFindingsCommand = exports.se_UpdateAccountConfigurationCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListTagsForResourceCommand = exports.se_ListScansCommand = exports.se_ListFindingsMetricsCommand = exports.se_GetScanCommand = exports.se_GetMetricsSummaryCommand = exports.se_GetFindingsCommand = exports.se_GetAccountConfigurationCommand = exports.se_CreateUploadUrlCommand = exports.se_CreateScanCommand = exports.se_BatchGetFindingsCommand = void 0;
|
|
4
4
|
const core_1 = require("@aws-sdk/core");
|
|
5
|
-
const
|
|
5
|
+
const core_2 = require("@smithy/core");
|
|
6
6
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
7
|
const uuid_1 = require("uuid");
|
|
8
8
|
const CodeGuruSecurityServiceException_1 = require("../models/CodeGuruSecurityServiceException");
|
|
9
9
|
const models_0_1 = require("../models/models_0");
|
|
10
10
|
const se_BatchGetFindingsCommand = async (input, context) => {
|
|
11
|
-
const
|
|
11
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
12
12
|
const headers = {
|
|
13
13
|
"content-type": "application/json",
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
b.bp("/batchGetFindings");
|
|
16
16
|
let body;
|
|
17
17
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
18
18
|
findingIdentifiers: (_) => (0, smithy_client_1._json)(_),
|
|
19
19
|
}));
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
hostname,
|
|
23
|
-
port,
|
|
24
|
-
method: "POST",
|
|
25
|
-
headers,
|
|
26
|
-
path: resolvedPath,
|
|
27
|
-
body,
|
|
28
|
-
});
|
|
20
|
+
b.m("POST").h(headers).b(body);
|
|
21
|
+
return b.build();
|
|
29
22
|
};
|
|
30
23
|
exports.se_BatchGetFindingsCommand = se_BatchGetFindingsCommand;
|
|
31
24
|
const se_CreateScanCommand = async (input, context) => {
|
|
32
|
-
const
|
|
25
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
33
26
|
const headers = {
|
|
34
27
|
"content-type": "application/json",
|
|
35
28
|
};
|
|
36
|
-
|
|
29
|
+
b.bp("/scans");
|
|
37
30
|
let body;
|
|
38
31
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
39
32
|
analysisType: [],
|
|
@@ -43,256 +36,166 @@ const se_CreateScanCommand = async (input, context) => {
|
|
|
43
36
|
scanType: [],
|
|
44
37
|
tags: (_) => (0, smithy_client_1._json)(_),
|
|
45
38
|
}));
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
hostname,
|
|
49
|
-
port,
|
|
50
|
-
method: "POST",
|
|
51
|
-
headers,
|
|
52
|
-
path: resolvedPath,
|
|
53
|
-
body,
|
|
54
|
-
});
|
|
39
|
+
b.m("POST").h(headers).b(body);
|
|
40
|
+
return b.build();
|
|
55
41
|
};
|
|
56
42
|
exports.se_CreateScanCommand = se_CreateScanCommand;
|
|
57
43
|
const se_CreateUploadUrlCommand = async (input, context) => {
|
|
58
|
-
const
|
|
44
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
59
45
|
const headers = {
|
|
60
46
|
"content-type": "application/json",
|
|
61
47
|
};
|
|
62
|
-
|
|
48
|
+
b.bp("/uploadUrl");
|
|
63
49
|
let body;
|
|
64
50
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
65
51
|
scanName: [],
|
|
66
52
|
}));
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
hostname,
|
|
70
|
-
port,
|
|
71
|
-
method: "POST",
|
|
72
|
-
headers,
|
|
73
|
-
path: resolvedPath,
|
|
74
|
-
body,
|
|
75
|
-
});
|
|
53
|
+
b.m("POST").h(headers).b(body);
|
|
54
|
+
return b.build();
|
|
76
55
|
};
|
|
77
56
|
exports.se_CreateUploadUrlCommand = se_CreateUploadUrlCommand;
|
|
78
57
|
const se_GetAccountConfigurationCommand = async (input, context) => {
|
|
79
|
-
const
|
|
58
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
80
59
|
const headers = {
|
|
81
60
|
"content-type": "application/json",
|
|
82
61
|
};
|
|
83
|
-
|
|
62
|
+
b.bp("/accountConfiguration/get");
|
|
84
63
|
let body;
|
|
85
64
|
body = "";
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
hostname,
|
|
89
|
-
port,
|
|
90
|
-
method: "GET",
|
|
91
|
-
headers,
|
|
92
|
-
path: resolvedPath,
|
|
93
|
-
body,
|
|
94
|
-
});
|
|
65
|
+
b.m("GET").h(headers).b(body);
|
|
66
|
+
return b.build();
|
|
95
67
|
};
|
|
96
68
|
exports.se_GetAccountConfigurationCommand = se_GetAccountConfigurationCommand;
|
|
97
69
|
const se_GetFindingsCommand = async (input, context) => {
|
|
98
|
-
const
|
|
70
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
99
71
|
const headers = {};
|
|
100
|
-
|
|
101
|
-
|
|
72
|
+
b.bp("/findings/{scanName}");
|
|
73
|
+
b.p("scanName", () => input.scanName, "{scanName}", false);
|
|
102
74
|
const query = (0, smithy_client_1.map)({
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
75
|
+
[_nT]: [, input[_nT]],
|
|
76
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
77
|
+
[_s]: [, input[_s]],
|
|
106
78
|
});
|
|
107
79
|
let body;
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
hostname,
|
|
111
|
-
port,
|
|
112
|
-
method: "GET",
|
|
113
|
-
headers,
|
|
114
|
-
path: resolvedPath,
|
|
115
|
-
query,
|
|
116
|
-
body,
|
|
117
|
-
});
|
|
80
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
81
|
+
return b.build();
|
|
118
82
|
};
|
|
119
83
|
exports.se_GetFindingsCommand = se_GetFindingsCommand;
|
|
120
84
|
const se_GetMetricsSummaryCommand = async (input, context) => {
|
|
121
|
-
const
|
|
85
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
122
86
|
const headers = {};
|
|
123
|
-
|
|
87
|
+
b.bp("/metrics/summary");
|
|
124
88
|
const query = (0, smithy_client_1.map)({
|
|
125
|
-
|
|
89
|
+
[_d]: [
|
|
126
90
|
(0, smithy_client_1.expectNonNull)(input.date, `date`) != null,
|
|
127
|
-
() => (input.
|
|
91
|
+
() => (input[_d].toISOString().split(".")[0] + "Z").toString(),
|
|
128
92
|
],
|
|
129
93
|
});
|
|
130
94
|
let body;
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
hostname,
|
|
134
|
-
port,
|
|
135
|
-
method: "GET",
|
|
136
|
-
headers,
|
|
137
|
-
path: resolvedPath,
|
|
138
|
-
query,
|
|
139
|
-
body,
|
|
140
|
-
});
|
|
95
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
96
|
+
return b.build();
|
|
141
97
|
};
|
|
142
98
|
exports.se_GetMetricsSummaryCommand = se_GetMetricsSummaryCommand;
|
|
143
99
|
const se_GetScanCommand = async (input, context) => {
|
|
144
|
-
const
|
|
100
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
145
101
|
const headers = {};
|
|
146
|
-
|
|
147
|
-
|
|
102
|
+
b.bp("/scans/{scanName}");
|
|
103
|
+
b.p("scanName", () => input.scanName, "{scanName}", false);
|
|
148
104
|
const query = (0, smithy_client_1.map)({
|
|
149
|
-
|
|
105
|
+
[_rI]: [, input[_rI]],
|
|
150
106
|
});
|
|
151
107
|
let body;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
hostname,
|
|
155
|
-
port,
|
|
156
|
-
method: "GET",
|
|
157
|
-
headers,
|
|
158
|
-
path: resolvedPath,
|
|
159
|
-
query,
|
|
160
|
-
body,
|
|
161
|
-
});
|
|
108
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
109
|
+
return b.build();
|
|
162
110
|
};
|
|
163
111
|
exports.se_GetScanCommand = se_GetScanCommand;
|
|
164
112
|
const se_ListFindingsMetricsCommand = async (input, context) => {
|
|
165
|
-
const
|
|
113
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
166
114
|
const headers = {};
|
|
167
|
-
|
|
115
|
+
b.bp("/metrics/findings");
|
|
168
116
|
const query = (0, smithy_client_1.map)({
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
117
|
+
[_nT]: [, input[_nT]],
|
|
118
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
119
|
+
[_sD]: [
|
|
172
120
|
(0, smithy_client_1.expectNonNull)(input.startDate, `startDate`) != null,
|
|
173
|
-
() => (input.
|
|
121
|
+
() => (input[_sD].toISOString().split(".")[0] + "Z").toString(),
|
|
174
122
|
],
|
|
175
|
-
|
|
123
|
+
[_eD]: [
|
|
176
124
|
(0, smithy_client_1.expectNonNull)(input.endDate, `endDate`) != null,
|
|
177
|
-
() => (input.
|
|
125
|
+
() => (input[_eD].toISOString().split(".")[0] + "Z").toString(),
|
|
178
126
|
],
|
|
179
127
|
});
|
|
180
128
|
let body;
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
hostname,
|
|
184
|
-
port,
|
|
185
|
-
method: "GET",
|
|
186
|
-
headers,
|
|
187
|
-
path: resolvedPath,
|
|
188
|
-
query,
|
|
189
|
-
body,
|
|
190
|
-
});
|
|
129
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
130
|
+
return b.build();
|
|
191
131
|
};
|
|
192
132
|
exports.se_ListFindingsMetricsCommand = se_ListFindingsMetricsCommand;
|
|
193
133
|
const se_ListScansCommand = async (input, context) => {
|
|
194
|
-
const
|
|
134
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
195
135
|
const headers = {};
|
|
196
|
-
|
|
136
|
+
b.bp("/scans");
|
|
197
137
|
const query = (0, smithy_client_1.map)({
|
|
198
|
-
|
|
199
|
-
|
|
138
|
+
[_nT]: [, input[_nT]],
|
|
139
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
200
140
|
});
|
|
201
141
|
let body;
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
hostname,
|
|
205
|
-
port,
|
|
206
|
-
method: "GET",
|
|
207
|
-
headers,
|
|
208
|
-
path: resolvedPath,
|
|
209
|
-
query,
|
|
210
|
-
body,
|
|
211
|
-
});
|
|
142
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
143
|
+
return b.build();
|
|
212
144
|
};
|
|
213
145
|
exports.se_ListScansCommand = se_ListScansCommand;
|
|
214
146
|
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
215
|
-
const
|
|
147
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
216
148
|
const headers = {};
|
|
217
|
-
|
|
218
|
-
|
|
149
|
+
b.bp("/tags/{resourceArn}");
|
|
150
|
+
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
219
151
|
let body;
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
hostname,
|
|
223
|
-
port,
|
|
224
|
-
method: "GET",
|
|
225
|
-
headers,
|
|
226
|
-
path: resolvedPath,
|
|
227
|
-
body,
|
|
228
|
-
});
|
|
152
|
+
b.m("GET").h(headers).b(body);
|
|
153
|
+
return b.build();
|
|
229
154
|
};
|
|
230
155
|
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
231
156
|
const se_TagResourceCommand = async (input, context) => {
|
|
232
|
-
const
|
|
157
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
233
158
|
const headers = {
|
|
234
159
|
"content-type": "application/json",
|
|
235
160
|
};
|
|
236
|
-
|
|
237
|
-
|
|
161
|
+
b.bp("/tags/{resourceArn}");
|
|
162
|
+
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
238
163
|
let body;
|
|
239
164
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
240
165
|
tags: (_) => (0, smithy_client_1._json)(_),
|
|
241
166
|
}));
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
hostname,
|
|
245
|
-
port,
|
|
246
|
-
method: "POST",
|
|
247
|
-
headers,
|
|
248
|
-
path: resolvedPath,
|
|
249
|
-
body,
|
|
250
|
-
});
|
|
167
|
+
b.m("POST").h(headers).b(body);
|
|
168
|
+
return b.build();
|
|
251
169
|
};
|
|
252
170
|
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
253
171
|
const se_UntagResourceCommand = async (input, context) => {
|
|
254
|
-
const
|
|
172
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
255
173
|
const headers = {};
|
|
256
|
-
|
|
257
|
-
|
|
174
|
+
b.bp("/tags/{resourceArn}");
|
|
175
|
+
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
258
176
|
const query = (0, smithy_client_1.map)({
|
|
259
|
-
|
|
177
|
+
[_tK]: [
|
|
260
178
|
(0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
|
|
261
|
-
() => (input
|
|
179
|
+
() => (input[_tK] || []).map((_entry) => _entry),
|
|
262
180
|
],
|
|
263
181
|
});
|
|
264
182
|
let body;
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
hostname,
|
|
268
|
-
port,
|
|
269
|
-
method: "DELETE",
|
|
270
|
-
headers,
|
|
271
|
-
path: resolvedPath,
|
|
272
|
-
query,
|
|
273
|
-
body,
|
|
274
|
-
});
|
|
183
|
+
b.m("DELETE").h(headers).q(query).b(body);
|
|
184
|
+
return b.build();
|
|
275
185
|
};
|
|
276
186
|
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
277
187
|
const se_UpdateAccountConfigurationCommand = async (input, context) => {
|
|
278
|
-
const
|
|
188
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
279
189
|
const headers = {
|
|
280
190
|
"content-type": "application/json",
|
|
281
191
|
};
|
|
282
|
-
|
|
192
|
+
b.bp("/updateAccountConfiguration");
|
|
283
193
|
let body;
|
|
284
194
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
285
195
|
encryptionConfig: (_) => (0, smithy_client_1._json)(_),
|
|
286
196
|
}));
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
hostname,
|
|
290
|
-
port,
|
|
291
|
-
method: "PUT",
|
|
292
|
-
headers,
|
|
293
|
-
path: resolvedPath,
|
|
294
|
-
body,
|
|
295
|
-
});
|
|
197
|
+
b.m("PUT").h(headers).b(body);
|
|
198
|
+
return b.build();
|
|
296
199
|
};
|
|
297
200
|
exports.se_UpdateAccountConfigurationCommand = se_UpdateAccountConfigurationCommand;
|
|
298
201
|
const de_BatchGetFindingsCommand = async (output, context) => {
|
|
@@ -1084,6 +987,14 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
1084
987
|
value !== "" &&
|
|
1085
988
|
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1086
989
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
990
|
+
const _d = "date";
|
|
991
|
+
const _eD = "endDate";
|
|
992
|
+
const _mR = "maxResults";
|
|
993
|
+
const _nT = "nextToken";
|
|
994
|
+
const _rI = "runId";
|
|
995
|
+
const _s = "status";
|
|
996
|
+
const _sD = "startDate";
|
|
997
|
+
const _tK = "tagKeys";
|
|
1087
998
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1088
999
|
if (encoded.length) {
|
|
1089
1000
|
return JSON.parse(encoded);
|
|
@@ -1,35 +1,28 @@
|
|
|
1
1
|
import { awsExpectUnion as __expectUnion } from "@aws-sdk/core";
|
|
2
|
-
import {
|
|
3
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseEpochTimestamp as __parseEpochTimestamp,
|
|
2
|
+
import { requestBuilder as rb } from "@smithy/core";
|
|
3
|
+
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
4
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
5
5
|
import { CodeGuruSecurityServiceException as __BaseException } from "../models/CodeGuruSecurityServiceException";
|
|
6
6
|
import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
7
7
|
export const se_BatchGetFindingsCommand = async (input, context) => {
|
|
8
|
-
const
|
|
8
|
+
const b = rb(input, context);
|
|
9
9
|
const headers = {
|
|
10
10
|
"content-type": "application/json",
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
b.bp("/batchGetFindings");
|
|
13
13
|
let body;
|
|
14
14
|
body = JSON.stringify(take(input, {
|
|
15
15
|
findingIdentifiers: (_) => _json(_),
|
|
16
16
|
}));
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
hostname,
|
|
20
|
-
port,
|
|
21
|
-
method: "POST",
|
|
22
|
-
headers,
|
|
23
|
-
path: resolvedPath,
|
|
24
|
-
body,
|
|
25
|
-
});
|
|
17
|
+
b.m("POST").h(headers).b(body);
|
|
18
|
+
return b.build();
|
|
26
19
|
};
|
|
27
20
|
export const se_CreateScanCommand = async (input, context) => {
|
|
28
|
-
const
|
|
21
|
+
const b = rb(input, context);
|
|
29
22
|
const headers = {
|
|
30
23
|
"content-type": "application/json",
|
|
31
24
|
};
|
|
32
|
-
|
|
25
|
+
b.bp("/scans");
|
|
33
26
|
let body;
|
|
34
27
|
body = JSON.stringify(take(input, {
|
|
35
28
|
analysisType: [],
|
|
@@ -39,245 +32,155 @@ export const se_CreateScanCommand = async (input, context) => {
|
|
|
39
32
|
scanType: [],
|
|
40
33
|
tags: (_) => _json(_),
|
|
41
34
|
}));
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
hostname,
|
|
45
|
-
port,
|
|
46
|
-
method: "POST",
|
|
47
|
-
headers,
|
|
48
|
-
path: resolvedPath,
|
|
49
|
-
body,
|
|
50
|
-
});
|
|
35
|
+
b.m("POST").h(headers).b(body);
|
|
36
|
+
return b.build();
|
|
51
37
|
};
|
|
52
38
|
export const se_CreateUploadUrlCommand = async (input, context) => {
|
|
53
|
-
const
|
|
39
|
+
const b = rb(input, context);
|
|
54
40
|
const headers = {
|
|
55
41
|
"content-type": "application/json",
|
|
56
42
|
};
|
|
57
|
-
|
|
43
|
+
b.bp("/uploadUrl");
|
|
58
44
|
let body;
|
|
59
45
|
body = JSON.stringify(take(input, {
|
|
60
46
|
scanName: [],
|
|
61
47
|
}));
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
hostname,
|
|
65
|
-
port,
|
|
66
|
-
method: "POST",
|
|
67
|
-
headers,
|
|
68
|
-
path: resolvedPath,
|
|
69
|
-
body,
|
|
70
|
-
});
|
|
48
|
+
b.m("POST").h(headers).b(body);
|
|
49
|
+
return b.build();
|
|
71
50
|
};
|
|
72
51
|
export const se_GetAccountConfigurationCommand = async (input, context) => {
|
|
73
|
-
const
|
|
52
|
+
const b = rb(input, context);
|
|
74
53
|
const headers = {
|
|
75
54
|
"content-type": "application/json",
|
|
76
55
|
};
|
|
77
|
-
|
|
56
|
+
b.bp("/accountConfiguration/get");
|
|
78
57
|
let body;
|
|
79
58
|
body = "";
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
hostname,
|
|
83
|
-
port,
|
|
84
|
-
method: "GET",
|
|
85
|
-
headers,
|
|
86
|
-
path: resolvedPath,
|
|
87
|
-
body,
|
|
88
|
-
});
|
|
59
|
+
b.m("GET").h(headers).b(body);
|
|
60
|
+
return b.build();
|
|
89
61
|
};
|
|
90
62
|
export const se_GetFindingsCommand = async (input, context) => {
|
|
91
|
-
const
|
|
63
|
+
const b = rb(input, context);
|
|
92
64
|
const headers = {};
|
|
93
|
-
|
|
94
|
-
|
|
65
|
+
b.bp("/findings/{scanName}");
|
|
66
|
+
b.p("scanName", () => input.scanName, "{scanName}", false);
|
|
95
67
|
const query = map({
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
68
|
+
[_nT]: [, input[_nT]],
|
|
69
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
70
|
+
[_s]: [, input[_s]],
|
|
99
71
|
});
|
|
100
72
|
let body;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
hostname,
|
|
104
|
-
port,
|
|
105
|
-
method: "GET",
|
|
106
|
-
headers,
|
|
107
|
-
path: resolvedPath,
|
|
108
|
-
query,
|
|
109
|
-
body,
|
|
110
|
-
});
|
|
73
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
74
|
+
return b.build();
|
|
111
75
|
};
|
|
112
76
|
export const se_GetMetricsSummaryCommand = async (input, context) => {
|
|
113
|
-
const
|
|
77
|
+
const b = rb(input, context);
|
|
114
78
|
const headers = {};
|
|
115
|
-
|
|
79
|
+
b.bp("/metrics/summary");
|
|
116
80
|
const query = map({
|
|
117
|
-
|
|
81
|
+
[_d]: [
|
|
118
82
|
__expectNonNull(input.date, `date`) != null,
|
|
119
|
-
() => (input.
|
|
83
|
+
() => (input[_d].toISOString().split(".")[0] + "Z").toString(),
|
|
120
84
|
],
|
|
121
85
|
});
|
|
122
86
|
let body;
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
hostname,
|
|
126
|
-
port,
|
|
127
|
-
method: "GET",
|
|
128
|
-
headers,
|
|
129
|
-
path: resolvedPath,
|
|
130
|
-
query,
|
|
131
|
-
body,
|
|
132
|
-
});
|
|
87
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
88
|
+
return b.build();
|
|
133
89
|
};
|
|
134
90
|
export const se_GetScanCommand = async (input, context) => {
|
|
135
|
-
const
|
|
91
|
+
const b = rb(input, context);
|
|
136
92
|
const headers = {};
|
|
137
|
-
|
|
138
|
-
|
|
93
|
+
b.bp("/scans/{scanName}");
|
|
94
|
+
b.p("scanName", () => input.scanName, "{scanName}", false);
|
|
139
95
|
const query = map({
|
|
140
|
-
|
|
96
|
+
[_rI]: [, input[_rI]],
|
|
141
97
|
});
|
|
142
98
|
let body;
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
hostname,
|
|
146
|
-
port,
|
|
147
|
-
method: "GET",
|
|
148
|
-
headers,
|
|
149
|
-
path: resolvedPath,
|
|
150
|
-
query,
|
|
151
|
-
body,
|
|
152
|
-
});
|
|
99
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
100
|
+
return b.build();
|
|
153
101
|
};
|
|
154
102
|
export const se_ListFindingsMetricsCommand = async (input, context) => {
|
|
155
|
-
const
|
|
103
|
+
const b = rb(input, context);
|
|
156
104
|
const headers = {};
|
|
157
|
-
|
|
105
|
+
b.bp("/metrics/findings");
|
|
158
106
|
const query = map({
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
107
|
+
[_nT]: [, input[_nT]],
|
|
108
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
109
|
+
[_sD]: [
|
|
162
110
|
__expectNonNull(input.startDate, `startDate`) != null,
|
|
163
|
-
() => (input.
|
|
111
|
+
() => (input[_sD].toISOString().split(".")[0] + "Z").toString(),
|
|
164
112
|
],
|
|
165
|
-
|
|
113
|
+
[_eD]: [
|
|
166
114
|
__expectNonNull(input.endDate, `endDate`) != null,
|
|
167
|
-
() => (input.
|
|
115
|
+
() => (input[_eD].toISOString().split(".")[0] + "Z").toString(),
|
|
168
116
|
],
|
|
169
117
|
});
|
|
170
118
|
let body;
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
hostname,
|
|
174
|
-
port,
|
|
175
|
-
method: "GET",
|
|
176
|
-
headers,
|
|
177
|
-
path: resolvedPath,
|
|
178
|
-
query,
|
|
179
|
-
body,
|
|
180
|
-
});
|
|
119
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
120
|
+
return b.build();
|
|
181
121
|
};
|
|
182
122
|
export const se_ListScansCommand = async (input, context) => {
|
|
183
|
-
const
|
|
123
|
+
const b = rb(input, context);
|
|
184
124
|
const headers = {};
|
|
185
|
-
|
|
125
|
+
b.bp("/scans");
|
|
186
126
|
const query = map({
|
|
187
|
-
|
|
188
|
-
|
|
127
|
+
[_nT]: [, input[_nT]],
|
|
128
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
189
129
|
});
|
|
190
130
|
let body;
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
hostname,
|
|
194
|
-
port,
|
|
195
|
-
method: "GET",
|
|
196
|
-
headers,
|
|
197
|
-
path: resolvedPath,
|
|
198
|
-
query,
|
|
199
|
-
body,
|
|
200
|
-
});
|
|
131
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
132
|
+
return b.build();
|
|
201
133
|
};
|
|
202
134
|
export const se_ListTagsForResourceCommand = async (input, context) => {
|
|
203
|
-
const
|
|
135
|
+
const b = rb(input, context);
|
|
204
136
|
const headers = {};
|
|
205
|
-
|
|
206
|
-
|
|
137
|
+
b.bp("/tags/{resourceArn}");
|
|
138
|
+
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
207
139
|
let body;
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
hostname,
|
|
211
|
-
port,
|
|
212
|
-
method: "GET",
|
|
213
|
-
headers,
|
|
214
|
-
path: resolvedPath,
|
|
215
|
-
body,
|
|
216
|
-
});
|
|
140
|
+
b.m("GET").h(headers).b(body);
|
|
141
|
+
return b.build();
|
|
217
142
|
};
|
|
218
143
|
export const se_TagResourceCommand = async (input, context) => {
|
|
219
|
-
const
|
|
144
|
+
const b = rb(input, context);
|
|
220
145
|
const headers = {
|
|
221
146
|
"content-type": "application/json",
|
|
222
147
|
};
|
|
223
|
-
|
|
224
|
-
|
|
148
|
+
b.bp("/tags/{resourceArn}");
|
|
149
|
+
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
225
150
|
let body;
|
|
226
151
|
body = JSON.stringify(take(input, {
|
|
227
152
|
tags: (_) => _json(_),
|
|
228
153
|
}));
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
hostname,
|
|
232
|
-
port,
|
|
233
|
-
method: "POST",
|
|
234
|
-
headers,
|
|
235
|
-
path: resolvedPath,
|
|
236
|
-
body,
|
|
237
|
-
});
|
|
154
|
+
b.m("POST").h(headers).b(body);
|
|
155
|
+
return b.build();
|
|
238
156
|
};
|
|
239
157
|
export const se_UntagResourceCommand = async (input, context) => {
|
|
240
|
-
const
|
|
158
|
+
const b = rb(input, context);
|
|
241
159
|
const headers = {};
|
|
242
|
-
|
|
243
|
-
|
|
160
|
+
b.bp("/tags/{resourceArn}");
|
|
161
|
+
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
244
162
|
const query = map({
|
|
245
|
-
|
|
163
|
+
[_tK]: [
|
|
246
164
|
__expectNonNull(input.tagKeys, `tagKeys`) != null,
|
|
247
|
-
() => (input
|
|
165
|
+
() => (input[_tK] || []).map((_entry) => _entry),
|
|
248
166
|
],
|
|
249
167
|
});
|
|
250
168
|
let body;
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
hostname,
|
|
254
|
-
port,
|
|
255
|
-
method: "DELETE",
|
|
256
|
-
headers,
|
|
257
|
-
path: resolvedPath,
|
|
258
|
-
query,
|
|
259
|
-
body,
|
|
260
|
-
});
|
|
169
|
+
b.m("DELETE").h(headers).q(query).b(body);
|
|
170
|
+
return b.build();
|
|
261
171
|
};
|
|
262
172
|
export const se_UpdateAccountConfigurationCommand = async (input, context) => {
|
|
263
|
-
const
|
|
173
|
+
const b = rb(input, context);
|
|
264
174
|
const headers = {
|
|
265
175
|
"content-type": "application/json",
|
|
266
176
|
};
|
|
267
|
-
|
|
177
|
+
b.bp("/updateAccountConfiguration");
|
|
268
178
|
let body;
|
|
269
179
|
body = JSON.stringify(take(input, {
|
|
270
180
|
encryptionConfig: (_) => _json(_),
|
|
271
181
|
}));
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
hostname,
|
|
275
|
-
port,
|
|
276
|
-
method: "PUT",
|
|
277
|
-
headers,
|
|
278
|
-
path: resolvedPath,
|
|
279
|
-
body,
|
|
280
|
-
});
|
|
182
|
+
b.m("PUT").h(headers).b(body);
|
|
183
|
+
return b.build();
|
|
281
184
|
};
|
|
282
185
|
export const de_BatchGetFindingsCommand = async (output, context) => {
|
|
283
186
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1055,6 +958,14 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
1055
958
|
value !== "" &&
|
|
1056
959
|
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1057
960
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
961
|
+
const _d = "date";
|
|
962
|
+
const _eD = "endDate";
|
|
963
|
+
const _mR = "maxResults";
|
|
964
|
+
const _nT = "nextToken";
|
|
965
|
+
const _rI = "runId";
|
|
966
|
+
const _s = "status";
|
|
967
|
+
const _sD = "startDate";
|
|
968
|
+
const _tK = "tagKeys";
|
|
1058
969
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1059
970
|
if (encoded.length) {
|
|
1060
971
|
return JSON.parse(encoded);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-codeguru-security",
|
|
3
3
|
"description": "AWS SDK for JavaScript Codeguru Security Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.477.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/client-sts": "3.477.0",
|
|
24
|
+
"@aws-sdk/core": "3.477.0",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.477.0",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.468.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.468.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.468.0",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"@aws-sdk/util-user-agent-browser": "3.468.0",
|
|
35
35
|
"@aws-sdk/util-user-agent-node": "3.470.0",
|
|
36
36
|
"@smithy/config-resolver": "^2.0.21",
|
|
37
|
+
"@smithy/core": "^1.2.0",
|
|
37
38
|
"@smithy/fetch-http-handler": "^2.3.1",
|
|
38
39
|
"@smithy/hash-node": "^2.0.17",
|
|
39
40
|
"@smithy/invalid-dependency": "^2.0.15",
|