Skip to main content

assessment_reports

Creates, updates, deletes, gets or lists an assessment_reports resource.

Overview

Nameassessment_reports
TypeResource
Idaws.auditmanager.assessment_reports

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
assessment_reportsarrayThe list of assessment reports that the ListAssessmentReports API returned.
next_tokenstringThe pagination token that's used to fetch the next set of results. (pattern: <code>^[A-Za-z0-9+/=]*$</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_assessment_reportsselectregionnextToken, maxResultsReturns a list of assessment reports created in Audit Manager.
create_assessment_reportinsertassessment_id, region, nameCreates an assessment report for the specified assessment.
delete_assessment_reportdeleteassessment_id, assessment_report_id, regionDeletes an assessment report in Audit Manager. When you run the DeleteAssessmentReport operation, Audit Manager attempts to delete the following data: The specified assessment report that’s stored in your S3 bucket The associated metadata that’s stored in Audit Manager If Audit Manager can’t access the assessment report in your S3 bucket, the report isn’t deleted. In this event, the DeleteAssessmentReport operation doesn’t fail. Instead, it proceeds to delete the associated metadata only. You must then delete the assessment report from the S3 bucket yourself. This scenario happens when Audit Manager receives a 403 (Forbidden) or 404 (Not Found) error from Amazon S3. To avoid this, make sure that your S3 bucket is available, and that you configured the correct permissions for Audit Manager to delete resources in your S3 bucket. For an example permissions policy that you can use, see Assessment report destination permissions in the Audit Manager User Guide. For information about the issues that could cause a 403 (Forbidden) or 404 (Not Found) error from Amazon S3, see List of Error Codes in the Amazon Simple Storage Service API Reference.
validate_assessment_report_integrityexecregion, s3RelativePathValidates the integrity of an assessment report in Audit Manager.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
assessment_idstringThe unique identifier for the assessment.
assessment_report_idstringThe unique identifier for the assessment report.
regionstringAWS region (default: us-east-1)
maxResultsintegerRepresents the maximum number of results on a page or for an API request call.
nextTokenstringThe pagination token that's used to fetch the next set of results.

SELECT examples

Returns a list of assessment reports created in Audit Manager.

SELECT
assessment_reports,
next_token
FROM aws.auditmanager.assessment_reports
WHERE region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;

INSERT examples

Creates an assessment report for the specified assessment.

INSERT INTO aws.auditmanager.assessment_reports (
name,
description,
queryStatement,
assessment_id,
region
)
SELECT
'{{ name }}' /* required */,
'{{ description }}',
'{{ queryStatement }}',
'{{ assessment_id }}',
'{{ region }}'
RETURNING
assessment_report
;

DELETE examples

Deletes an assessment report in Audit Manager. When you run the DeleteAssessmentReport operation, Audit Manager attempts to delete the following data: The specified assessment report that’s stored in your S3 bucket The associated metadata that’s stored in Audit Manager If Audit Manager can’t access the assessment report in your S3 bucket, the report isn’t deleted. In this event, the DeleteAssessmentReport operation doesn’t fail. Instead, it proceeds to delete the associated metadata only. You must then delete the assessment report from the S3 bucket yourself. This scenario happens when Audit Manager receives a 403 (Forbidden) or 404 (Not Found) error from Amazon S3. To avoid this, make sure that your S3 bucket is available, and that you configured the correct permissions for Audit Manager to delete resources in your S3 bucket. For an example permissions policy that you can use, see Assessment report destination permissions in the Audit Manager User Guide. For information about the issues that could cause a 403 (Forbidden) or 404 (Not Found) error from Amazon S3, see List of Error Codes in the Amazon Simple Storage Service API Reference.

DELETE FROM aws.auditmanager.assessment_reports
WHERE assessment_id = '{{ assessment_id }}' --required
AND assessment_report_id = '{{ assessment_report_id }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Validates the integrity of an assessment report in Audit Manager.

EXEC aws.auditmanager.assessment_reports.validate_assessment_report_integrity
@region='{{ region }}' --required
@@json=
'{
"s3RelativePath": "{{ s3RelativePath }}"
}'
;