diff --git a/clients/client-inspector2/src/commands/GetCisScanReportCommand.ts b/clients/client-inspector2/src/commands/GetCisScanReportCommand.ts index a87d98a08bc6..052e1488dc57 100644 --- a/clients/client-inspector2/src/commands/GetCisScanReportCommand.ts +++ b/clients/client-inspector2/src/commands/GetCisScanReportCommand.ts @@ -39,6 +39,7 @@ export interface GetCisScanReportCommandOutput extends GetCisScanReportResponse, * targetAccounts: [ // ReportTargetAccounts * "STRING_VALUE", * ], + * reportFormat: "PDF" || "CSV", * }; * const command = new GetCisScanReportCommand(input); * const response = await client.send(command); @@ -61,6 +62,9 @@ export interface GetCisScanReportCommandOutput extends GetCisScanReportResponse, * @throws {@link InternalServerException} (server fault) *

The request has failed due to an internal failure of the Amazon Inspector service.

* + * @throws {@link ResourceNotFoundException} (client fault) + *

The operation tried to access an invalid resource. Make sure the resource is specified correctly.

+ * * @throws {@link ThrottlingException} (client fault) *

The limit on the number of requests per second was exceeded.

* diff --git a/clients/client-inspector2/src/commands/ListCisScanResultsAggregatedByTargetResourceCommand.ts b/clients/client-inspector2/src/commands/ListCisScanResultsAggregatedByTargetResourceCommand.ts index 2a794b5f6a80..cffe86c62bd7 100644 --- a/clients/client-inspector2/src/commands/ListCisScanResultsAggregatedByTargetResourceCommand.ts +++ b/clients/client-inspector2/src/commands/ListCisScanResultsAggregatedByTargetResourceCommand.ts @@ -6,8 +6,10 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; import { Inspector2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../Inspector2Client"; -import { ListCisScanResultsAggregatedByTargetResourceRequest } from "../models/models_0"; -import { ListCisScanResultsAggregatedByTargetResourceResponse } from "../models/models_1"; +import { + ListCisScanResultsAggregatedByTargetResourceRequest, + ListCisScanResultsAggregatedByTargetResourceResponse, +} from "../models/models_1"; import { de_ListCisScanResultsAggregatedByTargetResourceCommand, se_ListCisScanResultsAggregatedByTargetResourceCommand, diff --git a/clients/client-inspector2/src/models/models_0.ts b/clients/client-inspector2/src/models/models_0.ts index d72e95a62a90..dfc141686baa 100644 --- a/clients/client-inspector2/src/models/models_0.ts +++ b/clients/client-inspector2/src/models/models_0.ts @@ -3328,6 +3328,20 @@ export interface CisNumberFilter { lowerInclusive?: number; } +/** + * @public + * @enum + */ +export const CisReportFormat = { + CSV: "CSV", + PDF: "PDF", +} as const; + +/** + * @public + */ +export type CisReportFormat = (typeof CisReportFormat)[keyof typeof CisReportFormat]; + /** * @public * @enum @@ -7144,6 +7158,16 @@ export interface GetCisScanReportRequest { * @public */ targetAccounts?: string[]; + + /** + *

+ * The format of the report. + * Valid values are PDF and CSV. + * If no value is specified, the report format defaults to PDF. + *

+ * @public + */ + reportFormat?: CisReportFormat; } /** @@ -7152,7 +7176,7 @@ export interface GetCisScanReportRequest { export interface GetCisScanReportResponse { /** *

- * The URL where a PDF of the CIS scan report can be downloaded. + * The URL where a PDF or CSV of the CIS scan report can be downloaded. *

* @public */ @@ -7740,44 +7764,3 @@ export interface ListCisScanResultsAggregatedByChecksResponse { */ nextToken?: string; } - -/** - * @public - */ -export interface ListCisScanResultsAggregatedByTargetResourceRequest { - /** - *

The scan ARN.

- * @public - */ - scanArn: string | undefined; - - /** - *

The filter criteria.

- * @public - */ - filterCriteria?: CisScanResultsAggregatedByTargetResourceFilterCriteria; - - /** - *

The sort by order.

- * @public - */ - sortBy?: CisScanResultsAggregatedByTargetResourceSortBy; - - /** - *

The sort order.

- * @public - */ - sortOrder?: CisSortOrder; - - /** - *

The pagination token from a previous request that's used to retrieve the next page of results.

- * @public - */ - nextToken?: string; - - /** - *

The maximum number of scan results aggregated by a target resource to be returned in a single page of results.

- * @public - */ - maxResults?: number; -} diff --git a/clients/client-inspector2/src/models/models_1.ts b/clients/client-inspector2/src/models/models_1.ts index 2cff531592a8..f0da95a9f5eb 100644 --- a/clients/client-inspector2/src/models/models_1.ts +++ b/clients/client-inspector2/src/models/models_1.ts @@ -9,6 +9,8 @@ import { CisDateFilter, CisNumberFilter, CisScan, + CisScanResultsAggregatedByTargetResourceFilterCriteria, + CisScanResultsAggregatedByTargetResourceSortBy, CisScanStatusFilter, CisSecurityLevel, CisSessionMessage, @@ -42,6 +44,47 @@ import { TagFilter, } from "./models_0"; +/** + * @public + */ +export interface ListCisScanResultsAggregatedByTargetResourceRequest { + /** + *

The scan ARN.

+ * @public + */ + scanArn: string | undefined; + + /** + *

The filter criteria.

+ * @public + */ + filterCriteria?: CisScanResultsAggregatedByTargetResourceFilterCriteria; + + /** + *

The sort by order.

+ * @public + */ + sortBy?: CisScanResultsAggregatedByTargetResourceSortBy; + + /** + *

The sort order.

+ * @public + */ + sortOrder?: CisSortOrder; + + /** + *

The pagination token from a previous request that's used to retrieve the next page of results.

+ * @public + */ + nextToken?: string; + + /** + *

The maximum number of scan results aggregated by a target resource to be returned in a single page of results.

+ * @public + */ + maxResults?: number; +} + /** * @public */ diff --git a/clients/client-inspector2/src/protocols/Aws_restJson1.ts b/clients/client-inspector2/src/protocols/Aws_restJson1.ts index af7ab4618515..a7c3ab672cab 100644 --- a/clients/client-inspector2/src/protocols/Aws_restJson1.ts +++ b/clients/client-inspector2/src/protocols/Aws_restJson1.ts @@ -794,6 +794,7 @@ export const se_GetCisScanReportCommand = async ( let body: any; body = JSON.stringify( take(input, { + reportFormat: [], scanArn: [], targetAccounts: (_) => _json(_), }) diff --git a/codegen/sdk-codegen/aws-models/inspector2.json b/codegen/sdk-codegen/aws-models/inspector2.json index 3a8c723ddb9e..52040901af83 100644 --- a/codegen/sdk-codegen/aws-models/inspector2.json +++ b/codegen/sdk-codegen/aws-models/inspector2.json @@ -1860,6 +1860,23 @@ "smithy.api#pattern": "^\\d{12}|o-[a-z0-9]{10,32}$" } }, + "com.amazonaws.inspector2#CisReportFormat": { + "type": "enum", + "members": { + "PDF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PDF" + } + }, + "CSV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CSV" + } + } + } + }, "com.amazonaws.inspector2#CisReportStatus": { "type": "enum", "members": { @@ -6967,6 +6984,9 @@ { "target": "com.amazonaws.inspector2#InternalServerException" }, + { + "target": "com.amazonaws.inspector2#ResourceNotFoundException" + }, { "target": "com.amazonaws.inspector2#ThrottlingException" }, @@ -6980,7 +7000,8 @@ { "title": "Sample GetCisScanReport Call", "input": { - "scanArn": "arn:aws:inspector2:us-east-1:123412341234:owner/123412341234/cis-scan/624b746d-e080-44ae-8c1d-48e653365a38" + "scanArn": "arn:aws:inspector2:us-east-1:123412341234:owner/123412341234/cis-scan/624b746d-e080-44ae-8c1d-48e653365a38", + "reportFormat": "PDF" }, "output": { "url": "www.s3.amazon.com/abcdef", @@ -7010,6 +7031,13 @@ "traits": { "smithy.api#documentation": "

The target accounts.

" } + }, + "reportFormat": { + "target": "com.amazonaws.inspector2#CisReportFormat", + "traits": { + "smithy.api#default": "PDF", + "smithy.api#documentation": "

\n The format of the report. \n Valid values are PDF and CSV. \n If no value is specified, the report format defaults to PDF.\n

" + } } }, "traits": { @@ -7022,7 +7050,7 @@ "url": { "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "

\n The URL where a PDF of the CIS scan report can be downloaded.\n

" + "smithy.api#documentation": "

\n The URL where a PDF or CSV of the CIS scan report can be downloaded.\n

" } }, "status": {