Skip to main content

test_runs

Creates, updates, deletes, gets or lists a test_runs resource.

Overview

Nametest_runs
TypeResource
Idaws.resiliencehubv2.test_runs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_targetingstringIndicates whether this test run targets a single account or multiple accounts. (SINGLE_ACCOUNT, MULTI_ACCOUNT)
ended_atstring (date-time)The timestamp when the test run ended.
error_messagestringA human-readable reason for test run failure. Only present when the status is FAILED or ERROR.
event_countintegerThe number of events recorded for the test run. Use ListTestRunEvents to retrieve the details.
experimentsarrayThe AWS Fault Injection Service (AWS FIS) experiments run as part of the test run.
logging_configurationobjectConfiguration for test execution logging destinations.
parametersobjectThe parameter values used for the test run.
permission_modelobjectDefines the permission model for a service.
policyobjectThe resilience policy snapshotted from the service when the run was started.
region_switch_execution_idstringThe identifier of the ARC Region switch execution detected during the test run. (pattern: <code>[a-z]{2}(-[a-z]+)+-[0-9]+/[0-9a-fA-F]{16}</code>)
region_switch_plan_arnstringARN 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>)
regionsarrayThe Regions snapshotted from the service when the run was started.
report_configurationobjectThe report configuration snapshotted from the service when the run was started.
report_outputobjectThe report generation result for the test run. Present after report generation completes or fails.
role_namestringResource name (used in ARN — no spaces allowed). (pattern: <code>[A-Za-z0-9][A-Za-z0-9_-]{1,59}</code>)
service_arnstringARN 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>)
started_atstring (date-time)The timestamp when the test run started.
statusstringThe current status of the test run. (INITIALIZING, RUNNING, STOPPING, PASSED, FAILED, STOPPED, ERROR)
stop_conditionsarrayThe stop conditions snapshotted from the test when the run was started.
test_idstringThe unique identifier of a test.
test_run_idstringThe unique identifier of a test run.
test_template_arnstringAn 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:

NameAccessible byRequired ParamsOptional ParamsDescription
get_test_runselecttestRunId, serviceArn, regionRetrieves a test run by ID, including its status, results, and the configuration snapshotted when the run started.
list_test_runsselectserviceArn, regiontestId, maxResults, nextTokenLists the runs of a test, or all test runs for a service.

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
regionstringAWS region (default: us-east-1)
serviceArnstringThe ARN of the service to list test runs for.
testRunIdstringThe identifier of the test run to retrieve.
maxResultsinteger
nextTokenstring
testIdstringFilter test runs by test identifier.

SELECT examples

Retrieves a test run by ID, including its status, results, and the configuration snapshotted when the run started.

SELECT
account_targeting,
ended_at,
error_message,
event_count,
experiments,
logging_configuration,
parameters,
permission_model,
policy,
region_switch_execution_id,
region_switch_plan_arn,
regions,
report_configuration,
report_output,
role_name,
service_arn,
started_at,
status,
stop_conditions,
test_id,
test_run_id,
test_template_arn
FROM aws.resiliencehubv2.test_runs
WHERE testRunId = '{{ testRunId }}' -- required
AND serviceArn = '{{ serviceArn }}' -- required
AND region = '{{ region }}' -- required
;