Skip to content

Commit fb2ca52

Browse files
author
awstools
committed
feat(client-inspector-scan): Adds an additional OutputFormat
1 parent 5053405 commit fb2ca52

File tree

5 files changed

+27
-34
lines changed

5 files changed

+27
-34
lines changed

clients/client-inspector-scan/src/commands/ScanSbomCommand.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface ScanSbomCommandInput extends ScanSbomRequest {}
2727
export interface ScanSbomCommandOutput extends ScanSbomResponse, __MetadataBearer {}
2828

2929
/**
30-
* <p>Scans a provided CycloneDX 1.5 SBOM and reports on any vulnerabilities discovered in that SBOM. You can generate compatible SBOMs for your resources using the <a href="">Amazon Inspector SBOM generator</a>.</p>
30+
* <p>Scans a provided CycloneDX 1.5 SBOM and reports on any vulnerabilities discovered in that SBOM. You can generate compatible SBOMs for your resources using the <a href="https://docs.aws.amazon.com/inspector/latest/user/sbom-generator.html">Amazon Inspector SBOM generator</a>.</p> <note> <p> The output of this action reports NVD and CVSS scores when NVD and CVSS scores are available. Because the output reports both scores, you might notice a discrepency between them. However, you can triage the severity of either score depending on the vendor of your choosing. </p> </note>
3131
* @example
3232
* Use a bare-bones client and the command you need to make an API call.
3333
* ```javascript
@@ -38,7 +38,7 @@ export interface ScanSbomCommandOutput extends ScanSbomResponse, __MetadataBeare
3838
* const client = new InspectorScanClient(config);
3939
* const input = { // ScanSbomRequest
4040
* sbom: "DOCUMENT_VALUE", // required
41-
* outputFormat: "CYCLONE_DX_1_5" || "INSPECTOR",
41+
* outputFormat: "CYCLONE_DX_1_5" || "INSPECTOR" || "INSPECTOR_ALT",
4242
* };
4343
* const command = new ScanSbomCommand(input);
4444
* const response = await client.send(command);
@@ -55,18 +55,13 @@ export interface ScanSbomCommandOutput extends ScanSbomResponse, __MetadataBeare
5555
* @see {@link InspectorScanClientResolvedConfig | config} for InspectorScanClient's `config` shape.
5656
*
5757
* @throws {@link AccessDeniedException} (client fault)
58-
* <p>You do not have sufficient access to perform this action.
59-
* </p>
58+
* <p>You do not have sufficient access to perform this action. </p>
6059
*
6160
* @throws {@link InternalServerException} (server fault)
62-
* <p>The request processing has failed because of an unknown error, exception or failure.
63-
*
64-
* </p>
61+
* <p>The request processing has failed because of an unknown error, exception or failure. </p>
6562
*
6663
* @throws {@link ThrottlingException} (client fault)
67-
* <p>The request was denied due to request throttling.
68-
*
69-
* </p>
64+
* <p>The request was denied due to request throttling. </p>
7065
*
7166
* @throws {@link ValidationException} (client fault)
7267
* <p>The request has failed validation due to missing required fields or having invalid inputs.</p>

clients/client-inspector-scan/src/models/enums.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export type InternalServerExceptionReason =
2020
export const OutputFormat = {
2121
CYCLONE_DX_1_5: "CYCLONE_DX_1_5",
2222
INSPECTOR: "INSPECTOR",
23+
INSPECTOR_ALT: "INSPECTOR_ALT",
2324
} as const;
2425
/**
2526
* @public

clients/client-inspector-scan/src/models/errors.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import { InspectorScanServiceException as __BaseException } from "./InspectorSca
66
import { ValidationExceptionField } from "./models_0";
77

88
/**
9-
* <p>You do not have sufficient access to perform this action.
10-
* </p>
9+
* <p>You do not have sufficient access to perform this action. </p>
1110
* @public
1211
*/
1312
export class AccessDeniedException extends __BaseException {
@@ -27,9 +26,7 @@ export class AccessDeniedException extends __BaseException {
2726
}
2827

2928
/**
30-
* <p>The request processing has failed because of an unknown error, exception or failure.
31-
*
32-
* </p>
29+
* <p>The request processing has failed because of an unknown error, exception or failure. </p>
3330
* @public
3431
*/
3532
export class InternalServerException extends __BaseException {
@@ -64,9 +61,7 @@ export class InternalServerException extends __BaseException {
6461
}
6562

6663
/**
67-
* <p>The request was denied due to request throttling.
68-
*
69-
* </p>
64+
* <p>The request was denied due to request throttling. </p>
7065
* @public
7166
*/
7267
export class ThrottlingException extends __BaseException {

clients/client-inspector-scan/src/models/models_0.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { OutputFormat } from "./enums";
88
*/
99
export interface ScanSbomRequest {
1010
/**
11-
* <p>The JSON file for the SBOM you want to scan. The SBOM must be in CycloneDX 1.5 format.</p>
11+
* <p>The JSON file for the SBOM you want to scan. The SBOM must be in CycloneDX 1.5 format. This format limits you to passing 2000 components before throwing a <code>ValidException</code> error.</p>
1212
* @public
1313
*/
1414
sbom: __DocumentType | undefined;
@@ -32,22 +32,18 @@ export interface ScanSbomResponse {
3232
}
3333

3434
/**
35-
* <p>The request has failed validation due to missing required fields or having invalid inputs.
36-
* </p>
35+
* <p>The request has failed validation due to missing required fields or having invalid inputs. </p>
3736
* @public
3837
*/
3938
export interface ValidationExceptionField {
4039
/**
41-
* <p>The name of the validation exception.
42-
*
43-
* </p>
40+
* <p>The name of the validation exception. </p>
4441
* @public
4542
*/
4643
name: string | undefined;
4744

4845
/**
49-
* <p>The validation exception message.
50-
* </p>
46+
* <p>The validation exception message. </p>
5147
* @public
5248
*/
5349
message: string | undefined;

codegen/sdk-codegen/aws-models/inspector-scan.json

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313
},
1414
"traits": {
15-
"smithy.api#documentation": "<p>You do not have sufficient access to perform this action.\n </p>",
15+
"smithy.api#documentation": "<p>You do not have sufficient access to perform this action. </p>",
1616
"smithy.api#error": "client",
1717
"smithy.api#httpError": 403
1818
}
@@ -685,7 +685,7 @@
685685
}
686686
},
687687
"traits": {
688-
"smithy.api#documentation": "<p>The request processing has failed because of an unknown error, exception or failure.\n \n </p>",
688+
"smithy.api#documentation": "<p>The request processing has failed because of an unknown error, exception or failure. </p>",
689689
"smithy.api#error": "server",
690690
"smithy.api#httpError": 500,
691691
"smithy.api#retryable": {}
@@ -722,6 +722,12 @@
722722
"traits": {
723723
"smithy.api#enumValue": "INSPECTOR"
724724
}
725+
},
726+
"INSPECTOR_ALT": {
727+
"target": "smithy.api#Unit",
728+
"traits": {
729+
"smithy.api#enumValue": "INSPECTOR_ALT"
730+
}
725731
}
726732
}
727733
},
@@ -751,7 +757,7 @@
751757
}
752758
],
753759
"traits": {
754-
"smithy.api#documentation": "<p>Scans a provided CycloneDX 1.5 SBOM and reports on any vulnerabilities discovered in that SBOM. You can generate compatible SBOMs for your resources using the <a href=\"\">Amazon Inspector SBOM generator</a>.</p>",
760+
"smithy.api#documentation": "<p>Scans a provided CycloneDX 1.5 SBOM and reports on any vulnerabilities discovered in that SBOM. You can generate compatible SBOMs for your resources using the <a href=\"https://docs.aws.amazon.com/inspector/latest/user/sbom-generator.html\">Amazon Inspector SBOM generator</a>.</p> <note> <p> The output of this action reports NVD and CVSS scores when NVD and CVSS scores are available. Because the output reports both scores, you might notice a discrepency between them. However, you can triage the severity of either score depending on the vendor of your choosing. </p> </note>",
755761
"smithy.api#examples": [
756762
{
757763
"title": "Sample ScanSbom Call",
@@ -931,7 +937,7 @@
931937
"sbom": {
932938
"target": "com.amazonaws.inspectorscan#Sbom",
933939
"traits": {
934-
"smithy.api#documentation": "<p>The JSON file for the SBOM you want to scan. The SBOM must be in CycloneDX 1.5 format.</p>",
940+
"smithy.api#documentation": "<p>The JSON file for the SBOM you want to scan. The SBOM must be in CycloneDX 1.5 format. This format limits you to passing 2000 components before throwing a <code>ValidException</code> error.</p>",
935941
"smithy.api#required": {}
936942
}
937943
},
@@ -978,7 +984,7 @@
978984
}
979985
},
980986
"traits": {
981-
"smithy.api#documentation": "<p>The request was denied due to request throttling.\n \n </p>",
987+
"smithy.api#documentation": "<p>The request was denied due to request throttling. </p>",
982988
"smithy.api#error": "client",
983989
"smithy.api#httpError": 429,
984990
"smithy.api#retryable": {
@@ -1021,20 +1027,20 @@
10211027
"name": {
10221028
"target": "smithy.api#String",
10231029
"traits": {
1024-
"smithy.api#documentation": "<p>The name of the validation exception.\n \n </p>",
1030+
"smithy.api#documentation": "<p>The name of the validation exception. </p>",
10251031
"smithy.api#required": {}
10261032
}
10271033
},
10281034
"message": {
10291035
"target": "smithy.api#String",
10301036
"traits": {
1031-
"smithy.api#documentation": "<p>The validation exception message.\n </p>",
1037+
"smithy.api#documentation": "<p>The validation exception message. </p>",
10321038
"smithy.api#required": {}
10331039
}
10341040
}
10351041
},
10361042
"traits": {
1037-
"smithy.api#documentation": "<p>The request has failed validation due to missing required fields or having invalid inputs.\n </p>"
1043+
"smithy.api#documentation": "<p>The request has failed validation due to missing required fields or having invalid inputs. </p>"
10381044
}
10391045
},
10401046
"com.amazonaws.inspectorscan#ValidationExceptionFields": {

0 commit comments

Comments
 (0)