reports
Creates, updates, deletes, gets or lists a reports resource.
Overview
| Name | reports |
| Type | Resource |
| Id | aws.resiliencehubv2.reports |
Fields
The following fields are returned by SELECT queries:
- list_reports
| Name | Datatype | Description |
|---|---|---|
assessment_id | string | Present for FAILURE_MODE reports. (pattern: <code>[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}</code>) |
created_at | string (date-time) | The timestamp when the report was created. |
report_output | object | Present when status is SUCCEEDED or FAILED. |
report_type | string | The type of the generated report. (FAILURE_MODE, TESTING) |
service_arn | string | ARN identifier. (pattern: <code>arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+.-]{0,1023}</code>) |
status | string | The status of the report generation. (PENDING, SUCCEEDED, FAILED) |
test_run_id | string | The unique identifier of a test run. |
test_template_arn | string | An ARN owned by the service. Accepts either a standard 12-digit account ID or the literal "aws" for AWS-managed resources, such as AWS-managed test templates. (pattern: <code>arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):([0-9]{12}|aws):[A-Za-z0-9/][A-Za-z0-9:_/+.-]{0,1023}</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_reports | select | region | serviceArn, reportType, testRunId, maxResults, nextToken | List reports for a service, or all reports owned by the account if serviceArn is not provided. |
create_report | insert | region, serviceArn, reportType | On-demand report creation. Idempotent — duplicate requests with same clientToken return existing result. |
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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
maxResults | integer | |
nextToken | string | |
reportType | string | Filter reports by type. |
serviceArn | string | Optional. If not provided, lists all reports owned by the account. |
testRunId | string |
SELECT examples
- list_reports
List reports for a service, or all reports owned by the account if serviceArn is not provided.
SELECT
assessment_id,
created_at,
report_output,
report_type,
service_arn,
status,
test_run_id,
test_template_arn
FROM aws.resiliencehubv2.reports
WHERE region = '{{ region }}' -- required
AND serviceArn = '{{ serviceArn }}'
AND reportType = '{{ reportType }}'
AND testRunId = '{{ testRunId }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_report
- Manifest
On-demand report creation. Idempotent — duplicate requests with same clientToken return existing result.
INSERT INTO aws.resiliencehubv2.reports (
serviceArn,
reportType,
clientToken,
region
)
SELECT
'{{ serviceArn }}' /* required */,
'{{ reportType }}' /* required */,
'{{ clientToken }}',
'{{ region }}'
RETURNING
report_generation_result
;
# Description fields are for documentation purposes
- name: reports
props:
- name: region
value: "{{ region }}"
description: Required parameter for the reports resource.
- name: serviceArn
value: "{{ serviceArn }}"
description: |
ARN identifier.
- name: reportType
value: "{{ reportType }}"
valid_values: ['FAILURE_MODE', 'TESTING']
- name: clientToken
value: "{{ clientToken }}"
description: |
Idempotency token.