CreateAssessmentReport - AWS Audit Manager

CreateAssessmentReport

Creates an assessment report for the specified assessment.

Request Syntax

POST /assessments/assessmentId/reports HTTP/1.1 Content-type: application/json { "description": "string", "name": "string", "queryStatement": "string" }

URI Request Parameters

The request uses the following URI parameters.

assessmentId

The identifier for the assessment.

Length Constraints: Fixed length of 36.

Pattern: ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$

Required: Yes

Request Body

The request accepts the following data in JSON format.

description

The description of the assessment report.

Type: String

Length Constraints: Maximum length of 1000.

Pattern: ^[\w\W\s\S]*$

Required: No

name

The name of the new assessment report.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 300.

Pattern: ^[a-zA-Z0-9-_\.]+$

Required: Yes

queryStatement

A SQL statement that represents an evidence finder query.

Provide this parameter when you want to generate an assessment report from the results of an evidence finder search query. When you use this parameter, Audit Manager generates a one-time report using only the evidence from the query output. This report does not include any assessment evidence that was manually added to a report using the console, or associated with a report using the API.

To use this parameter, the enablementStatus of evidence finder must be ENABLED.

For examples and help resolving queryStatement validation exceptions, see Troubleshooting evidence finder issues in the AWS Audit Manager User Guide.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 10000.

Pattern: (?s).*

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "assessmentReport": { "assessmentId": "string", "assessmentName": "string", "author": "string", "awsAccountId": "string", "creationTime": number, "description": "string", "id": "string", "name": "string", "status": "string" } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

assessmentReport

The new assessment report that the CreateAssessmentReport API returned.

Type: AssessmentReport object

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

Your account isn't registered with AWS Audit Manager. Check the delegated administrator setup on the Audit Manager settings page, and try again.

HTTP Status Code: 403

InternalServerException

An internal service error occurred during the processing of your request. Try again later.

HTTP Status Code: 500

ResourceNotFoundException

The resource that's specified in the request can't be found.

HTTP Status Code: 404

ValidationException

The request has invalid or missing parameters.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: