@aws-sdk/client-inspector-scan 3.927.0 → 3.929.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.js +124 -153
- package/dist-cjs/runtimeConfig.shared.js +2 -0
- package/dist-es/InspectorScanClient.js +2 -0
- package/dist-es/commands/ScanSbomCommand.js +3 -9
- package/dist-es/runtimeConfig.shared.js +2 -0
- package/dist-es/schemas/schemas_0.js +110 -0
- package/dist-types/InspectorScanClient.d.ts +10 -1
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +12 -0
- package/dist-types/ts3.4/InspectorScanClient.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +17 -0
- package/package.json +5 -5
- package/dist-es/protocols/Aws_restJson1.js +0 -136
- package/dist-types/protocols/Aws_restJson1.d.ts +0 -11
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -17
package/dist-cjs/index.js
CHANGED
|
@@ -6,6 +6,7 @@ var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detect
|
|
|
6
6
|
var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
|
|
7
7
|
var configResolver = require('@smithy/config-resolver');
|
|
8
8
|
var core = require('@smithy/core');
|
|
9
|
+
var schema = require('@smithy/core/schema');
|
|
9
10
|
var middlewareContentLength = require('@smithy/middleware-content-length');
|
|
10
11
|
var middlewareEndpoint = require('@smithy/middleware-endpoint');
|
|
11
12
|
var middlewareRetry = require('@smithy/middleware-retry');
|
|
@@ -14,8 +15,6 @@ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
|
|
|
14
15
|
var runtimeConfig = require('./runtimeConfig');
|
|
15
16
|
var regionConfigResolver = require('@aws-sdk/region-config-resolver');
|
|
16
17
|
var protocolHttp = require('@smithy/protocol-http');
|
|
17
|
-
var middlewareSerde = require('@smithy/middleware-serde');
|
|
18
|
-
var core$1 = require('@aws-sdk/core');
|
|
19
18
|
|
|
20
19
|
const resolveClientEndpointParameters = (options) => {
|
|
21
20
|
return Object.assign(options, {
|
|
@@ -91,6 +90,7 @@ class InspectorScanClient extends smithyClient.Client {
|
|
|
91
90
|
const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
|
|
92
91
|
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
93
92
|
this.config = _config_8;
|
|
93
|
+
this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
|
|
94
94
|
this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
|
|
95
95
|
this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
|
|
96
96
|
this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
|
|
@@ -110,14 +110,14 @@ class InspectorScanClient extends smithyClient.Client {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
class InspectorScanServiceException extends smithyClient.ServiceException {
|
|
113
|
+
let InspectorScanServiceException$1 = class InspectorScanServiceException extends smithyClient.ServiceException {
|
|
114
114
|
constructor(options) {
|
|
115
115
|
super(options);
|
|
116
116
|
Object.setPrototypeOf(this, InspectorScanServiceException.prototype);
|
|
117
117
|
}
|
|
118
|
-
}
|
|
118
|
+
};
|
|
119
119
|
|
|
120
|
-
class AccessDeniedException extends InspectorScanServiceException {
|
|
120
|
+
let AccessDeniedException$1 = class AccessDeniedException extends InspectorScanServiceException$1 {
|
|
121
121
|
name = "AccessDeniedException";
|
|
122
122
|
$fault = "client";
|
|
123
123
|
constructor(opts) {
|
|
@@ -128,12 +128,12 @@ class AccessDeniedException extends InspectorScanServiceException {
|
|
|
128
128
|
});
|
|
129
129
|
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
130
130
|
}
|
|
131
|
-
}
|
|
131
|
+
};
|
|
132
132
|
const InternalServerExceptionReason = {
|
|
133
133
|
FAILED_TO_GENERATE_SBOM: "FAILED_TO_GENERATE_SBOM",
|
|
134
134
|
OTHER: "OTHER",
|
|
135
135
|
};
|
|
136
|
-
class InternalServerException extends InspectorScanServiceException {
|
|
136
|
+
let InternalServerException$1 = class InternalServerException extends InspectorScanServiceException$1 {
|
|
137
137
|
name = "InternalServerException";
|
|
138
138
|
$fault = "server";
|
|
139
139
|
$retryable = {};
|
|
@@ -149,12 +149,12 @@ class InternalServerException extends InspectorScanServiceException {
|
|
|
149
149
|
this.reason = opts.reason;
|
|
150
150
|
this.retryAfterSeconds = opts.retryAfterSeconds;
|
|
151
151
|
}
|
|
152
|
-
}
|
|
152
|
+
};
|
|
153
153
|
const OutputFormat = {
|
|
154
154
|
CYCLONE_DX_1_5: "CYCLONE_DX_1_5",
|
|
155
155
|
INSPECTOR: "INSPECTOR",
|
|
156
156
|
};
|
|
157
|
-
class ThrottlingException extends InspectorScanServiceException {
|
|
157
|
+
let ThrottlingException$1 = class ThrottlingException extends InspectorScanServiceException$1 {
|
|
158
158
|
name = "ThrottlingException";
|
|
159
159
|
$fault = "client";
|
|
160
160
|
$retryable = {
|
|
@@ -170,7 +170,7 @@ class ThrottlingException extends InspectorScanServiceException {
|
|
|
170
170
|
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
171
171
|
this.retryAfterSeconds = opts.retryAfterSeconds;
|
|
172
172
|
}
|
|
173
|
-
}
|
|
173
|
+
};
|
|
174
174
|
const ValidationExceptionReason = {
|
|
175
175
|
CANNOT_PARSE: "CANNOT_PARSE",
|
|
176
176
|
FIELD_VALIDATION_FAILED: "FIELD_VALIDATION_FAILED",
|
|
@@ -178,7 +178,7 @@ const ValidationExceptionReason = {
|
|
|
178
178
|
UNKNOWN_OPERATION: "UNKNOWN_OPERATION",
|
|
179
179
|
UNSUPPORTED_SBOM_TYPE: "UNSUPPORTED_SBOM_TYPE",
|
|
180
180
|
};
|
|
181
|
-
class ValidationException extends InspectorScanServiceException {
|
|
181
|
+
let ValidationException$1 = class ValidationException extends InspectorScanServiceException$1 {
|
|
182
182
|
name = "ValidationException";
|
|
183
183
|
$fault = "client";
|
|
184
184
|
reason;
|
|
@@ -193,153 +193,124 @@ class ValidationException extends InspectorScanServiceException {
|
|
|
193
193
|
this.reason = opts.reason;
|
|
194
194
|
this.fields = opts.fields;
|
|
195
195
|
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
const se_ScanSbomCommand = async (input, context) => {
|
|
199
|
-
const b = core.requestBuilder(input, context);
|
|
200
|
-
const headers = {
|
|
201
|
-
"content-type": "application/json",
|
|
202
|
-
};
|
|
203
|
-
b.bp("/scan/sbom");
|
|
204
|
-
let body;
|
|
205
|
-
body = JSON.stringify(smithyClient.take(input, {
|
|
206
|
-
outputFormat: [],
|
|
207
|
-
sbom: (_) => se_Sbom(_),
|
|
208
|
-
}));
|
|
209
|
-
b.m("POST").h(headers).b(body);
|
|
210
|
-
return b.build();
|
|
211
|
-
};
|
|
212
|
-
const de_ScanSbomCommand = async (output, context) => {
|
|
213
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
214
|
-
return de_CommandError(output, context);
|
|
215
|
-
}
|
|
216
|
-
const contents = smithyClient.map({
|
|
217
|
-
$metadata: deserializeMetadata(output),
|
|
218
|
-
});
|
|
219
|
-
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
220
|
-
const doc = smithyClient.take(data, {
|
|
221
|
-
sbom: (_) => de_Sbom(_),
|
|
222
|
-
});
|
|
223
|
-
Object.assign(contents, doc);
|
|
224
|
-
return contents;
|
|
225
|
-
};
|
|
226
|
-
const de_CommandError = async (output, context) => {
|
|
227
|
-
const parsedOutput = {
|
|
228
|
-
...output,
|
|
229
|
-
body: await core$1.parseJsonErrorBody(output.body, context),
|
|
230
|
-
};
|
|
231
|
-
const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
|
|
232
|
-
switch (errorCode) {
|
|
233
|
-
case "AccessDeniedException":
|
|
234
|
-
case "com.amazonaws.inspectorscan#AccessDeniedException":
|
|
235
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput);
|
|
236
|
-
case "InternalServerException":
|
|
237
|
-
case "com.amazonaws.inspectorscan#InternalServerException":
|
|
238
|
-
throw await de_InternalServerExceptionRes(parsedOutput);
|
|
239
|
-
case "ThrottlingException":
|
|
240
|
-
case "com.amazonaws.inspectorscan#ThrottlingException":
|
|
241
|
-
throw await de_ThrottlingExceptionRes(parsedOutput);
|
|
242
|
-
case "ValidationException":
|
|
243
|
-
case "com.amazonaws.inspectorscan#ValidationException":
|
|
244
|
-
throw await de_ValidationExceptionRes(parsedOutput);
|
|
245
|
-
default:
|
|
246
|
-
const parsedBody = parsedOutput.body;
|
|
247
|
-
return throwDefaultError({
|
|
248
|
-
output,
|
|
249
|
-
parsedBody,
|
|
250
|
-
errorCode,
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
196
|
};
|
|
254
|
-
|
|
255
|
-
const
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
const
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
reason: smithyClient.expectString,
|
|
276
|
-
});
|
|
277
|
-
Object.assign(contents, doc);
|
|
278
|
-
const exception = new InternalServerException({
|
|
279
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
280
|
-
...contents,
|
|
281
|
-
});
|
|
282
|
-
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
283
|
-
};
|
|
284
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
285
|
-
const contents = smithyClient.map({
|
|
286
|
-
[_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => smithyClient.strictParseInt32(parsedOutput.headers[_ra])],
|
|
287
|
-
});
|
|
288
|
-
const data = parsedOutput.body;
|
|
289
|
-
const doc = smithyClient.take(data, {
|
|
290
|
-
message: smithyClient.expectString,
|
|
291
|
-
});
|
|
292
|
-
Object.assign(contents, doc);
|
|
293
|
-
const exception = new ThrottlingException({
|
|
294
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
295
|
-
...contents,
|
|
296
|
-
});
|
|
297
|
-
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
298
|
-
};
|
|
299
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
300
|
-
const contents = smithyClient.map({});
|
|
301
|
-
const data = parsedOutput.body;
|
|
302
|
-
const doc = smithyClient.take(data, {
|
|
303
|
-
fields: smithyClient._json,
|
|
304
|
-
message: smithyClient.expectString,
|
|
305
|
-
reason: smithyClient.expectString,
|
|
306
|
-
});
|
|
307
|
-
Object.assign(contents, doc);
|
|
308
|
-
const exception = new ValidationException({
|
|
309
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
310
|
-
...contents,
|
|
311
|
-
});
|
|
312
|
-
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
313
|
-
};
|
|
314
|
-
const se_Sbom = (input, context) => {
|
|
315
|
-
return input;
|
|
316
|
-
};
|
|
317
|
-
const de_Sbom = (output, context) => {
|
|
318
|
-
return output;
|
|
319
|
-
};
|
|
320
|
-
const deserializeMetadata = (output) => ({
|
|
321
|
-
httpStatusCode: output.statusCode,
|
|
322
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
323
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
324
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
325
|
-
});
|
|
197
|
+
|
|
198
|
+
const _ADE = "AccessDeniedException";
|
|
199
|
+
const _ISE = "InternalServerException";
|
|
200
|
+
const _RA = "Retry-After";
|
|
201
|
+
const _SS = "ScanSbom";
|
|
202
|
+
const _SSR = "ScanSbomRequest";
|
|
203
|
+
const _SSRc = "ScanSbomResponse";
|
|
204
|
+
const _TE = "ThrottlingException";
|
|
205
|
+
const _VE = "ValidationException";
|
|
206
|
+
const _VEF = "ValidationExceptionField";
|
|
207
|
+
const _VEFa = "ValidationExceptionFields";
|
|
208
|
+
const _c = "client";
|
|
209
|
+
const _e = "error";
|
|
210
|
+
const _f = "fields";
|
|
211
|
+
const _h = "http";
|
|
212
|
+
const _hE = "httpError";
|
|
213
|
+
const _hH = "httpHeader";
|
|
214
|
+
const _m = "message";
|
|
215
|
+
const _n = "name";
|
|
216
|
+
const _oF = "outputFormat";
|
|
217
|
+
const _r = "reason";
|
|
326
218
|
const _rAS = "retryAfterSeconds";
|
|
327
|
-
const
|
|
219
|
+
const _s = "server";
|
|
220
|
+
const _sb = "sbom";
|
|
221
|
+
const _sm = "smithy.ts.sdk.synthetic.com.amazonaws.inspectorscan";
|
|
222
|
+
const n0 = "com.amazonaws.inspectorscan";
|
|
223
|
+
var AccessDeniedException = [
|
|
224
|
+
-3,
|
|
225
|
+
n0,
|
|
226
|
+
_ADE,
|
|
227
|
+
{
|
|
228
|
+
[_e]: _c,
|
|
229
|
+
[_hE]: 403,
|
|
230
|
+
},
|
|
231
|
+
[_m],
|
|
232
|
+
[0],
|
|
233
|
+
];
|
|
234
|
+
schema.TypeRegistry.for(n0).registerError(AccessDeniedException, AccessDeniedException$1);
|
|
235
|
+
var InternalServerException = [
|
|
236
|
+
-3,
|
|
237
|
+
n0,
|
|
238
|
+
_ISE,
|
|
239
|
+
{
|
|
240
|
+
[_e]: _s,
|
|
241
|
+
[_hE]: 500,
|
|
242
|
+
},
|
|
243
|
+
[_m, _r, _rAS],
|
|
244
|
+
[
|
|
245
|
+
0,
|
|
246
|
+
0,
|
|
247
|
+
[
|
|
248
|
+
1,
|
|
249
|
+
{
|
|
250
|
+
[_hH]: _RA,
|
|
251
|
+
},
|
|
252
|
+
],
|
|
253
|
+
],
|
|
254
|
+
];
|
|
255
|
+
schema.TypeRegistry.for(n0).registerError(InternalServerException, InternalServerException$1);
|
|
256
|
+
var ScanSbomRequest = [3, n0, _SSR, 0, [_sb, _oF], [15, 0]];
|
|
257
|
+
var ScanSbomResponse = [3, n0, _SSRc, 0, [_sb], [15]];
|
|
258
|
+
var ThrottlingException = [
|
|
259
|
+
-3,
|
|
260
|
+
n0,
|
|
261
|
+
_TE,
|
|
262
|
+
{
|
|
263
|
+
[_e]: _c,
|
|
264
|
+
[_hE]: 429,
|
|
265
|
+
},
|
|
266
|
+
[_m, _rAS],
|
|
267
|
+
[
|
|
268
|
+
0,
|
|
269
|
+
[
|
|
270
|
+
1,
|
|
271
|
+
{
|
|
272
|
+
[_hH]: _RA,
|
|
273
|
+
},
|
|
274
|
+
],
|
|
275
|
+
],
|
|
276
|
+
];
|
|
277
|
+
schema.TypeRegistry.for(n0).registerError(ThrottlingException, ThrottlingException$1);
|
|
278
|
+
var ValidationException = [
|
|
279
|
+
-3,
|
|
280
|
+
n0,
|
|
281
|
+
_VE,
|
|
282
|
+
{
|
|
283
|
+
[_e]: _c,
|
|
284
|
+
[_hE]: 400,
|
|
285
|
+
},
|
|
286
|
+
[_m, _r, _f],
|
|
287
|
+
[0, 0, () => ValidationExceptionFields],
|
|
288
|
+
];
|
|
289
|
+
schema.TypeRegistry.for(n0).registerError(ValidationException, ValidationException$1);
|
|
290
|
+
var ValidationExceptionField = [3, n0, _VEF, 0, [_n, _m], [0, 0]];
|
|
291
|
+
var InspectorScanServiceException = [-3, _sm, "InspectorScanServiceException", 0, [], []];
|
|
292
|
+
schema.TypeRegistry.for(_sm).registerError(InspectorScanServiceException, InspectorScanServiceException$1);
|
|
293
|
+
var ValidationExceptionFields = [1, n0, _VEFa, 0, () => ValidationExceptionField];
|
|
294
|
+
var ScanSbom = [
|
|
295
|
+
9,
|
|
296
|
+
n0,
|
|
297
|
+
_SS,
|
|
298
|
+
{
|
|
299
|
+
[_h]: ["POST", "/scan/sbom", 200],
|
|
300
|
+
},
|
|
301
|
+
() => ScanSbomRequest,
|
|
302
|
+
() => ScanSbomResponse,
|
|
303
|
+
];
|
|
328
304
|
|
|
329
305
|
class ScanSbomCommand extends smithyClient.Command
|
|
330
306
|
.classBuilder()
|
|
331
307
|
.ep(commonParams)
|
|
332
308
|
.m(function (Command, cs, config, o) {
|
|
333
|
-
return [
|
|
334
|
-
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
335
|
-
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
336
|
-
];
|
|
309
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
337
310
|
})
|
|
338
311
|
.s("InspectorScan", "ScanSbom", {})
|
|
339
312
|
.n("InspectorScanClient", "ScanSbomCommand")
|
|
340
|
-
.
|
|
341
|
-
.ser(se_ScanSbomCommand)
|
|
342
|
-
.de(de_ScanSbomCommand)
|
|
313
|
+
.sc(ScanSbom)
|
|
343
314
|
.build() {
|
|
344
315
|
}
|
|
345
316
|
|
|
@@ -358,14 +329,14 @@ Object.defineProperty(exports, "__Client", {
|
|
|
358
329
|
enumerable: true,
|
|
359
330
|
get: function () { return smithyClient.Client; }
|
|
360
331
|
});
|
|
361
|
-
exports.AccessDeniedException = AccessDeniedException;
|
|
332
|
+
exports.AccessDeniedException = AccessDeniedException$1;
|
|
362
333
|
exports.InspectorScan = InspectorScan;
|
|
363
334
|
exports.InspectorScanClient = InspectorScanClient;
|
|
364
|
-
exports.InspectorScanServiceException = InspectorScanServiceException;
|
|
365
|
-
exports.InternalServerException = InternalServerException;
|
|
335
|
+
exports.InspectorScanServiceException = InspectorScanServiceException$1;
|
|
336
|
+
exports.InternalServerException = InternalServerException$1;
|
|
366
337
|
exports.InternalServerExceptionReason = InternalServerExceptionReason;
|
|
367
338
|
exports.OutputFormat = OutputFormat;
|
|
368
339
|
exports.ScanSbomCommand = ScanSbomCommand;
|
|
369
|
-
exports.ThrottlingException = ThrottlingException;
|
|
370
|
-
exports.ValidationException = ValidationException;
|
|
340
|
+
exports.ThrottlingException = ThrottlingException$1;
|
|
341
|
+
exports.ValidationException = ValidationException$1;
|
|
371
342
|
exports.ValidationExceptionReason = ValidationExceptionReason;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRuntimeConfig = void 0;
|
|
4
4
|
const core_1 = require("@aws-sdk/core");
|
|
5
|
+
const protocols_1 = require("@aws-sdk/core/protocols");
|
|
5
6
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
7
|
const url_parser_1 = require("@smithy/url-parser");
|
|
7
8
|
const util_base64_1 = require("@smithy/util-base64");
|
|
@@ -25,6 +26,7 @@ const getRuntimeConfig = (config) => {
|
|
|
25
26
|
},
|
|
26
27
|
],
|
|
27
28
|
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
|
29
|
+
protocol: config?.protocol ?? new protocols_1.AwsRestJsonProtocol({ defaultNamespace: "com.amazonaws.inspectorscan" }),
|
|
28
30
|
serviceId: config?.serviceId ?? "Inspector Scan",
|
|
29
31
|
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
|
30
32
|
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
|
|
@@ -4,6 +4,7 @@ import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detec
|
|
|
4
4
|
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
|
|
5
5
|
import { resolveRegionConfig } from "@smithy/config-resolver";
|
|
6
6
|
import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
|
|
7
|
+
import { getSchemaSerdePlugin } from "@smithy/core/schema";
|
|
7
8
|
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
|
|
8
9
|
import { resolveEndpointConfig } from "@smithy/middleware-endpoint";
|
|
9
10
|
import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry";
|
|
@@ -28,6 +29,7 @@ export class InspectorScanClient extends __Client {
|
|
|
28
29
|
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
|
|
29
30
|
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
30
31
|
this.config = _config_8;
|
|
32
|
+
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
|
|
31
33
|
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
32
34
|
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
33
35
|
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
-
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
2
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
3
|
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
-
import {
|
|
4
|
+
import { ScanSbom } from "../schemas/schemas_0";
|
|
6
5
|
export { $Command };
|
|
7
6
|
export class ScanSbomCommand extends $Command
|
|
8
7
|
.classBuilder()
|
|
9
8
|
.ep(commonParams)
|
|
10
9
|
.m(function (Command, cs, config, o) {
|
|
11
|
-
return [
|
|
12
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
13
|
-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
14
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
15
11
|
})
|
|
16
12
|
.s("InspectorScan", "ScanSbom", {})
|
|
17
13
|
.n("InspectorScanClient", "ScanSbomCommand")
|
|
18
|
-
.
|
|
19
|
-
.ser(se_ScanSbomCommand)
|
|
20
|
-
.de(de_ScanSbomCommand)
|
|
14
|
+
.sc(ScanSbom)
|
|
21
15
|
.build() {
|
|
22
16
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AwsSdkSigV4Signer } from "@aws-sdk/core";
|
|
2
|
+
import { AwsRestJsonProtocol } from "@aws-sdk/core/protocols";
|
|
2
3
|
import { NoOpLogger } from "@smithy/smithy-client";
|
|
3
4
|
import { parseUrl } from "@smithy/url-parser";
|
|
4
5
|
import { fromBase64, toBase64 } from "@smithy/util-base64";
|
|
@@ -22,6 +23,7 @@ export const getRuntimeConfig = (config) => {
|
|
|
22
23
|
},
|
|
23
24
|
],
|
|
24
25
|
logger: config?.logger ?? new NoOpLogger(),
|
|
26
|
+
protocol: config?.protocol ?? new AwsRestJsonProtocol({ defaultNamespace: "com.amazonaws.inspectorscan" }),
|
|
25
27
|
serviceId: config?.serviceId ?? "Inspector Scan",
|
|
26
28
|
urlParser: config?.urlParser ?? parseUrl,
|
|
27
29
|
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
const _ADE = "AccessDeniedException";
|
|
2
|
+
const _ISE = "InternalServerException";
|
|
3
|
+
const _RA = "Retry-After";
|
|
4
|
+
const _SS = "ScanSbom";
|
|
5
|
+
const _SSR = "ScanSbomRequest";
|
|
6
|
+
const _SSRc = "ScanSbomResponse";
|
|
7
|
+
const _TE = "ThrottlingException";
|
|
8
|
+
const _VE = "ValidationException";
|
|
9
|
+
const _VEF = "ValidationExceptionField";
|
|
10
|
+
const _VEFa = "ValidationExceptionFields";
|
|
11
|
+
const _c = "client";
|
|
12
|
+
const _e = "error";
|
|
13
|
+
const _f = "fields";
|
|
14
|
+
const _h = "http";
|
|
15
|
+
const _hE = "httpError";
|
|
16
|
+
const _hH = "httpHeader";
|
|
17
|
+
const _m = "message";
|
|
18
|
+
const _n = "name";
|
|
19
|
+
const _oF = "outputFormat";
|
|
20
|
+
const _r = "reason";
|
|
21
|
+
const _rAS = "retryAfterSeconds";
|
|
22
|
+
const _s = "server";
|
|
23
|
+
const _sb = "sbom";
|
|
24
|
+
const _sm = "smithy.ts.sdk.synthetic.com.amazonaws.inspectorscan";
|
|
25
|
+
const n0 = "com.amazonaws.inspectorscan";
|
|
26
|
+
import { TypeRegistry } from "@smithy/core/schema";
|
|
27
|
+
import { AccessDeniedException as __AccessDeniedException, InternalServerException as __InternalServerException, ThrottlingException as __ThrottlingException, ValidationException as __ValidationException, } from "../models/index";
|
|
28
|
+
import { InspectorScanServiceException as __InspectorScanServiceException } from "../models/InspectorScanServiceException";
|
|
29
|
+
export var AccessDeniedException = [
|
|
30
|
+
-3,
|
|
31
|
+
n0,
|
|
32
|
+
_ADE,
|
|
33
|
+
{
|
|
34
|
+
[_e]: _c,
|
|
35
|
+
[_hE]: 403,
|
|
36
|
+
},
|
|
37
|
+
[_m],
|
|
38
|
+
[0],
|
|
39
|
+
];
|
|
40
|
+
TypeRegistry.for(n0).registerError(AccessDeniedException, __AccessDeniedException);
|
|
41
|
+
export var InternalServerException = [
|
|
42
|
+
-3,
|
|
43
|
+
n0,
|
|
44
|
+
_ISE,
|
|
45
|
+
{
|
|
46
|
+
[_e]: _s,
|
|
47
|
+
[_hE]: 500,
|
|
48
|
+
},
|
|
49
|
+
[_m, _r, _rAS],
|
|
50
|
+
[
|
|
51
|
+
0,
|
|
52
|
+
0,
|
|
53
|
+
[
|
|
54
|
+
1,
|
|
55
|
+
{
|
|
56
|
+
[_hH]: _RA,
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
],
|
|
60
|
+
];
|
|
61
|
+
TypeRegistry.for(n0).registerError(InternalServerException, __InternalServerException);
|
|
62
|
+
export var ScanSbomRequest = [3, n0, _SSR, 0, [_sb, _oF], [15, 0]];
|
|
63
|
+
export var ScanSbomResponse = [3, n0, _SSRc, 0, [_sb], [15]];
|
|
64
|
+
export var ThrottlingException = [
|
|
65
|
+
-3,
|
|
66
|
+
n0,
|
|
67
|
+
_TE,
|
|
68
|
+
{
|
|
69
|
+
[_e]: _c,
|
|
70
|
+
[_hE]: 429,
|
|
71
|
+
},
|
|
72
|
+
[_m, _rAS],
|
|
73
|
+
[
|
|
74
|
+
0,
|
|
75
|
+
[
|
|
76
|
+
1,
|
|
77
|
+
{
|
|
78
|
+
[_hH]: _RA,
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
],
|
|
82
|
+
];
|
|
83
|
+
TypeRegistry.for(n0).registerError(ThrottlingException, __ThrottlingException);
|
|
84
|
+
export var ValidationException = [
|
|
85
|
+
-3,
|
|
86
|
+
n0,
|
|
87
|
+
_VE,
|
|
88
|
+
{
|
|
89
|
+
[_e]: _c,
|
|
90
|
+
[_hE]: 400,
|
|
91
|
+
},
|
|
92
|
+
[_m, _r, _f],
|
|
93
|
+
[0, 0, () => ValidationExceptionFields],
|
|
94
|
+
];
|
|
95
|
+
TypeRegistry.for(n0).registerError(ValidationException, __ValidationException);
|
|
96
|
+
export var ValidationExceptionField = [3, n0, _VEF, 0, [_n, _m], [0, 0]];
|
|
97
|
+
export var __Unit = "unit";
|
|
98
|
+
export var InspectorScanServiceException = [-3, _sm, "InspectorScanServiceException", 0, [], []];
|
|
99
|
+
TypeRegistry.for(_sm).registerError(InspectorScanServiceException, __InspectorScanServiceException);
|
|
100
|
+
export var ValidationExceptionFields = [1, n0, _VEFa, 0, () => ValidationExceptionField];
|
|
101
|
+
export var ScanSbom = [
|
|
102
|
+
9,
|
|
103
|
+
n0,
|
|
104
|
+
_SS,
|
|
105
|
+
{
|
|
106
|
+
[_h]: ["POST", "/scan/sbom", 200],
|
|
107
|
+
},
|
|
108
|
+
() => ScanSbomRequest,
|
|
109
|
+
() => ScanSbomResponse,
|
|
110
|
+
];
|
|
@@ -5,7 +5,7 @@ import { EndpointInputConfig, EndpointResolvedConfig } from "@smithy/middleware-
|
|
|
5
5
|
import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
|
|
6
6
|
import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
|
|
7
7
|
import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
|
|
8
|
-
import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
8
|
+
import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, ClientProtocol, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, HttpRequest, HttpResponse, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
9
9
|
import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
|
|
10
10
|
import { ScanSbomCommandInput, ScanSbomCommandOutput } from "./commands/ScanSbomCommand";
|
|
11
11
|
import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
|
|
@@ -142,6 +142,15 @@ export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHand
|
|
|
142
142
|
* Optional extensions
|
|
143
143
|
*/
|
|
144
144
|
extensions?: RuntimeExtension[];
|
|
145
|
+
/**
|
|
146
|
+
* The protocol controlling the message type (e.g. HTTP) and format (e.g. JSON)
|
|
147
|
+
* may be overridden. A default will always be set by the client.
|
|
148
|
+
* Available options depend on the service's supported protocols and will not be validated by
|
|
149
|
+
* the client.
|
|
150
|
+
* @alpha
|
|
151
|
+
*
|
|
152
|
+
*/
|
|
153
|
+
protocol?: ClientProtocol<HttpRequest, HttpResponse>;
|
|
145
154
|
/**
|
|
146
155
|
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
|
|
147
156
|
*/
|
|
@@ -29,6 +29,7 @@ export declare const getRuntimeConfig: (config: InspectorScanClientConfig) => {
|
|
|
29
29
|
profile?: string;
|
|
30
30
|
logger: import("@smithy/types").Logger;
|
|
31
31
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
32
|
+
protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
|
|
32
33
|
customUserAgent?: string | import("@smithy/types").UserAgent;
|
|
33
34
|
userAgentAppId?: string | undefined | import("@smithy/types").Provider<string | undefined>;
|
|
34
35
|
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
|
|
@@ -31,6 +31,7 @@ export declare const getRuntimeConfig: (config: InspectorScanClientConfig) => {
|
|
|
31
31
|
profile?: string;
|
|
32
32
|
logger: import("@smithy/types").Logger;
|
|
33
33
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
34
|
+
protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
|
|
34
35
|
customUserAgent?: string | import("@smithy/types").UserAgent;
|
|
35
36
|
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
|
|
36
37
|
endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Provider<string> | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
|
|
@@ -27,6 +27,7 @@ export declare const getRuntimeConfig: (config: InspectorScanClientConfig) => {
|
|
|
27
27
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
28
28
|
logger: import("@smithy/types").Logger;
|
|
29
29
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
30
|
+
protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
|
|
30
31
|
defaultsMode: import("@smithy/smithy-client").DefaultsMode | import("@smithy/types").Provider<import("@smithy/smithy-client").DefaultsMode>;
|
|
31
32
|
customUserAgent?: string | import("@smithy/types").UserAgent;
|
|
32
33
|
userAgentAppId?: string | undefined | import("@smithy/types").Provider<string | undefined>;
|
|
@@ -14,6 +14,7 @@ export declare const getRuntimeConfig: (config: InspectorScanClientConfig) => {
|
|
|
14
14
|
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").InspectorScanHttpAuthSchemeProvider;
|
|
15
15
|
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
|
|
16
16
|
logger: import("@smithy/types").Logger;
|
|
17
|
+
protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
|
|
17
18
|
serviceId: string;
|
|
18
19
|
urlParser: import("@smithy/types").UrlParser;
|
|
19
20
|
utf8Decoder: import("@smithy/types").Decoder;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { StaticErrorSchema, StaticListSchema, StaticOperationSchema, StaticStructureSchema } from "@smithy/types";
|
|
2
|
+
export declare var AccessDeniedException: StaticErrorSchema;
|
|
3
|
+
export declare var InternalServerException: StaticErrorSchema;
|
|
4
|
+
export declare var ScanSbomRequest: StaticStructureSchema;
|
|
5
|
+
export declare var ScanSbomResponse: StaticStructureSchema;
|
|
6
|
+
export declare var ThrottlingException: StaticErrorSchema;
|
|
7
|
+
export declare var ValidationException: StaticErrorSchema;
|
|
8
|
+
export declare var ValidationExceptionField: StaticStructureSchema;
|
|
9
|
+
export declare var __Unit: "unit";
|
|
10
|
+
export declare var InspectorScanServiceException: StaticErrorSchema;
|
|
11
|
+
export declare var ValidationExceptionFields: StaticListSchema;
|
|
12
|
+
export declare var ScanSbom: StaticOperationSchema;
|
|
@@ -30,10 +30,13 @@ import {
|
|
|
30
30
|
BodyLengthCalculator as __BodyLengthCalculator,
|
|
31
31
|
CheckOptionalClientConfig as __CheckOptionalClientConfig,
|
|
32
32
|
ChecksumConstructor as __ChecksumConstructor,
|
|
33
|
+
ClientProtocol,
|
|
33
34
|
Decoder as __Decoder,
|
|
34
35
|
Encoder as __Encoder,
|
|
35
36
|
HashConstructor as __HashConstructor,
|
|
36
37
|
HttpHandlerOptions as __HttpHandlerOptions,
|
|
38
|
+
HttpRequest,
|
|
39
|
+
HttpResponse,
|
|
37
40
|
Logger as __Logger,
|
|
38
41
|
Provider as __Provider,
|
|
39
42
|
Provider,
|
|
@@ -82,6 +85,7 @@ export interface ClientDefaults
|
|
|
82
85
|
retryMode?: string | __Provider<string>;
|
|
83
86
|
logger?: __Logger;
|
|
84
87
|
extensions?: RuntimeExtension[];
|
|
88
|
+
protocol?: ClientProtocol<HttpRequest, HttpResponse>;
|
|
85
89
|
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
|
|
86
90
|
}
|
|
87
91
|
export type InspectorScanClientConfigType = Partial<
|
|
@@ -38,6 +38,10 @@ export declare const getRuntimeConfig: (config: InspectorScanClientConfig) => {
|
|
|
38
38
|
profile?: string;
|
|
39
39
|
logger: import("@smithy/types").Logger;
|
|
40
40
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
41
|
+
protocol: import("@smithy/types").ClientProtocol<
|
|
42
|
+
import("@smithy/types").HttpRequest,
|
|
43
|
+
import("@smithy/types").HttpResponse
|
|
44
|
+
>;
|
|
41
45
|
customUserAgent?: string | import("@smithy/types").UserAgent;
|
|
42
46
|
userAgentAppId?:
|
|
43
47
|
| string
|
|
@@ -38,6 +38,10 @@ export declare const getRuntimeConfig: (config: InspectorScanClientConfig) => {
|
|
|
38
38
|
profile?: string;
|
|
39
39
|
logger: import("@smithy/types").Logger;
|
|
40
40
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
41
|
+
protocol: import("@smithy/types").ClientProtocol<
|
|
42
|
+
import("@smithy/types").HttpRequest,
|
|
43
|
+
import("@smithy/types").HttpResponse
|
|
44
|
+
>;
|
|
41
45
|
customUserAgent?: string | import("@smithy/types").UserAgent;
|
|
42
46
|
retryStrategy?:
|
|
43
47
|
| import("@smithy/types").RetryStrategy
|
|
@@ -37,6 +37,10 @@ export declare const getRuntimeConfig: (config: InspectorScanClientConfig) => {
|
|
|
37
37
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
38
38
|
logger: import("@smithy/types").Logger;
|
|
39
39
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
40
|
+
protocol: import("@smithy/types").ClientProtocol<
|
|
41
|
+
import("@smithy/types").HttpRequest,
|
|
42
|
+
import("@smithy/types").HttpResponse
|
|
43
|
+
>;
|
|
40
44
|
defaultsMode:
|
|
41
45
|
| import("@smithy/smithy-client").DefaultsMode
|
|
42
46
|
| import("@smithy/types").Provider<
|
|
@@ -14,6 +14,10 @@ export declare const getRuntimeConfig: (config: InspectorScanClientConfig) => {
|
|
|
14
14
|
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").InspectorScanHttpAuthSchemeProvider;
|
|
15
15
|
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
|
|
16
16
|
logger: import("@smithy/types").Logger;
|
|
17
|
+
protocol: import("@smithy/types").ClientProtocol<
|
|
18
|
+
import("@smithy/types").HttpRequest,
|
|
19
|
+
import("@smithy/types").HttpResponse
|
|
20
|
+
>;
|
|
17
21
|
serviceId: string;
|
|
18
22
|
urlParser: import("@smithy/types").UrlParser;
|
|
19
23
|
utf8Decoder: import("@smithy/types").Decoder;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
StaticErrorSchema,
|
|
3
|
+
StaticListSchema,
|
|
4
|
+
StaticOperationSchema,
|
|
5
|
+
StaticStructureSchema,
|
|
6
|
+
} from "@smithy/types";
|
|
7
|
+
export declare var AccessDeniedException: StaticErrorSchema;
|
|
8
|
+
export declare var InternalServerException: StaticErrorSchema;
|
|
9
|
+
export declare var ScanSbomRequest: StaticStructureSchema;
|
|
10
|
+
export declare var ScanSbomResponse: StaticStructureSchema;
|
|
11
|
+
export declare var ThrottlingException: StaticErrorSchema;
|
|
12
|
+
export declare var ValidationException: StaticErrorSchema;
|
|
13
|
+
export declare var ValidationExceptionField: StaticStructureSchema;
|
|
14
|
+
export declare var __Unit: "unit";
|
|
15
|
+
export declare var InspectorScanServiceException: StaticErrorSchema;
|
|
16
|
+
export declare var ValidationExceptionFields: StaticListSchema;
|
|
17
|
+
export declare var ScanSbom: StaticOperationSchema;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-inspector-scan",
|
|
3
3
|
"description": "AWS SDK for JavaScript Inspector Scan Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.929.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-inspector-scan",
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
23
|
-
"@aws-sdk/core": "3.
|
|
24
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/core": "3.928.0",
|
|
24
|
+
"@aws-sdk/credential-provider-node": "3.929.0",
|
|
25
25
|
"@aws-sdk/middleware-host-header": "3.922.0",
|
|
26
26
|
"@aws-sdk/middleware-logger": "3.922.0",
|
|
27
27
|
"@aws-sdk/middleware-recursion-detection": "3.922.0",
|
|
28
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
28
|
+
"@aws-sdk/middleware-user-agent": "3.928.0",
|
|
29
29
|
"@aws-sdk/region-config-resolver": "3.925.0",
|
|
30
30
|
"@aws-sdk/types": "3.922.0",
|
|
31
31
|
"@aws-sdk/util-endpoints": "3.922.0",
|
|
32
32
|
"@aws-sdk/util-user-agent-browser": "3.922.0",
|
|
33
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
33
|
+
"@aws-sdk/util-user-agent-node": "3.928.0",
|
|
34
34
|
"@smithy/config-resolver": "^4.4.2",
|
|
35
35
|
"@smithy/core": "^3.17.2",
|
|
36
36
|
"@smithy/fetch-http-handler": "^5.3.5",
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
2
|
-
import { requestBuilder as rb } from "@smithy/core";
|
|
3
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
-
import { InspectorScanServiceException as __BaseException } from "../models/InspectorScanServiceException";
|
|
5
|
-
import { AccessDeniedException, InternalServerException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
6
|
-
export const se_ScanSbomCommand = async (input, context) => {
|
|
7
|
-
const b = rb(input, context);
|
|
8
|
-
const headers = {
|
|
9
|
-
"content-type": "application/json",
|
|
10
|
-
};
|
|
11
|
-
b.bp("/scan/sbom");
|
|
12
|
-
let body;
|
|
13
|
-
body = JSON.stringify(take(input, {
|
|
14
|
-
outputFormat: [],
|
|
15
|
-
sbom: (_) => se_Sbom(_, context),
|
|
16
|
-
}));
|
|
17
|
-
b.m("POST").h(headers).b(body);
|
|
18
|
-
return b.build();
|
|
19
|
-
};
|
|
20
|
-
export const de_ScanSbomCommand = async (output, context) => {
|
|
21
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
22
|
-
return de_CommandError(output, context);
|
|
23
|
-
}
|
|
24
|
-
const contents = map({
|
|
25
|
-
$metadata: deserializeMetadata(output),
|
|
26
|
-
});
|
|
27
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
28
|
-
const doc = take(data, {
|
|
29
|
-
sbom: (_) => de_Sbom(_, context),
|
|
30
|
-
});
|
|
31
|
-
Object.assign(contents, doc);
|
|
32
|
-
return contents;
|
|
33
|
-
};
|
|
34
|
-
const de_CommandError = async (output, context) => {
|
|
35
|
-
const parsedOutput = {
|
|
36
|
-
...output,
|
|
37
|
-
body: await parseErrorBody(output.body, context),
|
|
38
|
-
};
|
|
39
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
40
|
-
switch (errorCode) {
|
|
41
|
-
case "AccessDeniedException":
|
|
42
|
-
case "com.amazonaws.inspectorscan#AccessDeniedException":
|
|
43
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
44
|
-
case "InternalServerException":
|
|
45
|
-
case "com.amazonaws.inspectorscan#InternalServerException":
|
|
46
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
47
|
-
case "ThrottlingException":
|
|
48
|
-
case "com.amazonaws.inspectorscan#ThrottlingException":
|
|
49
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
50
|
-
case "ValidationException":
|
|
51
|
-
case "com.amazonaws.inspectorscan#ValidationException":
|
|
52
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
53
|
-
default:
|
|
54
|
-
const parsedBody = parsedOutput.body;
|
|
55
|
-
return throwDefaultError({
|
|
56
|
-
output,
|
|
57
|
-
parsedBody,
|
|
58
|
-
errorCode,
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
const throwDefaultError = withBaseException(__BaseException);
|
|
63
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
64
|
-
const contents = map({});
|
|
65
|
-
const data = parsedOutput.body;
|
|
66
|
-
const doc = take(data, {
|
|
67
|
-
message: __expectString,
|
|
68
|
-
});
|
|
69
|
-
Object.assign(contents, doc);
|
|
70
|
-
const exception = new AccessDeniedException({
|
|
71
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
72
|
-
...contents,
|
|
73
|
-
});
|
|
74
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
75
|
-
};
|
|
76
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
77
|
-
const contents = map({
|
|
78
|
-
[_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
|
|
79
|
-
});
|
|
80
|
-
const data = parsedOutput.body;
|
|
81
|
-
const doc = take(data, {
|
|
82
|
-
message: __expectString,
|
|
83
|
-
reason: __expectString,
|
|
84
|
-
});
|
|
85
|
-
Object.assign(contents, doc);
|
|
86
|
-
const exception = new InternalServerException({
|
|
87
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
88
|
-
...contents,
|
|
89
|
-
});
|
|
90
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
91
|
-
};
|
|
92
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
93
|
-
const contents = map({
|
|
94
|
-
[_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
|
|
95
|
-
});
|
|
96
|
-
const data = parsedOutput.body;
|
|
97
|
-
const doc = take(data, {
|
|
98
|
-
message: __expectString,
|
|
99
|
-
});
|
|
100
|
-
Object.assign(contents, doc);
|
|
101
|
-
const exception = new ThrottlingException({
|
|
102
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
103
|
-
...contents,
|
|
104
|
-
});
|
|
105
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
106
|
-
};
|
|
107
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
108
|
-
const contents = map({});
|
|
109
|
-
const data = parsedOutput.body;
|
|
110
|
-
const doc = take(data, {
|
|
111
|
-
fields: _json,
|
|
112
|
-
message: __expectString,
|
|
113
|
-
reason: __expectString,
|
|
114
|
-
});
|
|
115
|
-
Object.assign(contents, doc);
|
|
116
|
-
const exception = new ValidationException({
|
|
117
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
118
|
-
...contents,
|
|
119
|
-
});
|
|
120
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
121
|
-
};
|
|
122
|
-
const se_Sbom = (input, context) => {
|
|
123
|
-
return input;
|
|
124
|
-
};
|
|
125
|
-
const de_Sbom = (output, context) => {
|
|
126
|
-
return output;
|
|
127
|
-
};
|
|
128
|
-
const deserializeMetadata = (output) => ({
|
|
129
|
-
httpStatusCode: output.statusCode,
|
|
130
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
131
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
132
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
133
|
-
});
|
|
134
|
-
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
135
|
-
const _rAS = "retryAfterSeconds";
|
|
136
|
-
const _ra = "retry-after";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
|
|
2
|
-
import { SerdeContext as __SerdeContext } from "@smithy/types";
|
|
3
|
-
import { ScanSbomCommandInput, ScanSbomCommandOutput } from "../commands/ScanSbomCommand";
|
|
4
|
-
/**
|
|
5
|
-
* serializeAws_restJson1ScanSbomCommand
|
|
6
|
-
*/
|
|
7
|
-
export declare const se_ScanSbomCommand: (input: ScanSbomCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
8
|
-
/**
|
|
9
|
-
* deserializeAws_restJson1ScanSbomCommand
|
|
10
|
-
*/
|
|
11
|
-
export declare const de_ScanSbomCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ScanSbomCommandOutput>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
HttpRequest as __HttpRequest,
|
|
3
|
-
HttpResponse as __HttpResponse,
|
|
4
|
-
} from "@smithy/protocol-http";
|
|
5
|
-
import { SerdeContext as __SerdeContext } from "@smithy/types";
|
|
6
|
-
import {
|
|
7
|
-
ScanSbomCommandInput,
|
|
8
|
-
ScanSbomCommandOutput,
|
|
9
|
-
} from "../commands/ScanSbomCommand";
|
|
10
|
-
export declare const se_ScanSbomCommand: (
|
|
11
|
-
input: ScanSbomCommandInput,
|
|
12
|
-
context: __SerdeContext
|
|
13
|
-
) => Promise<__HttpRequest>;
|
|
14
|
-
export declare const de_ScanSbomCommand: (
|
|
15
|
-
output: __HttpResponse,
|
|
16
|
-
context: __SerdeContext
|
|
17
|
-
) => Promise<ScanSbomCommandOutput>;
|