assessment_reports
Creates, updates, deletes, gets or lists an assessment_reports resource.
Overview
| Name | assessment_reports |
| Type | Resource |
| Id | aws.auditmanager.assessment_reports |
Fields
The following fields are returned by SELECT queries:
- list_assessment_reports
| Name | Datatype | Description |
|---|---|---|
assessment_reports | array | The list of assessment reports that the ListAssessmentReports API returned. |
next_token | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_assessment_reports | select | region | nextToken, maxResults | Returns a list of assessment reports created in Audit Manager. |
create_assessment_report | insert | assessment_id, region, name | Creates an assessment report for the specified assessment. | |
delete_assessment_report | delete | assessment_id, assessment_report_id, region | 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. | |
validate_assessment_report_integrity | exec | region, s3RelativePath | Validates 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.
| Name | Datatype | Description |
|---|---|---|
assessment_id | string | The unique identifier for the assessment. |
assessment_report_id | string | The unique identifier for the assessment report. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | Represents the maximum number of results on a page or for an API request call. |
nextToken | string | The pagination token that's used to fetch the next set of results. |
SELECT examples
- list_assessment_reports
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
- create_assessment_report
- Manifest
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
;
# Description fields are for documentation purposes
- name: assessment_reports
props:
- name: assessment_id
value: "{{ assessment_id }}"
description: Required parameter for the assessment_reports resource.
- name: region
value: "{{ region }}"
description: Required parameter for the assessment_reports resource.
- name: name
value: "{{ name }}"
- name: description
value: "{{ description }}"
- name: queryStatement
value: "{{ queryStatement }}"
DELETE examples
- delete_assessment_report
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
- validate_assessment_report_integrity
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 }}"
}'
;