AWS Resilience Hub V2

2026/07/31 - AWS Resilience Hub V2 - 17 new 2 updated api methods

Changes  Adding support for new testing capability in AWS Resilience Hub.

UpdateTest (new) Link ¶

Updates the configuration of an existing test.

See also: AWS API Documentation

Request Syntax

client.update_test(
    testId='string',
    serviceArn='string',
    loggingConfiguration={
        's3BucketName': 'string',
        'cloudWatchLogGroupArn': 'string',
        'logSchemaVersion': 'string'
    },
    stopConditions=[
        {
            'source': 'aws:cloudwatch:alarm'|'none',
            'value': 'string'
        },
    ],
    roleName='string',
    parameters={
        'string': [
            'string',
        ]
    }
)
type testId:

string

param testId:

[REQUIRED]

The identifier of the test to update.

type serviceArn:

string

param serviceArn:

[REQUIRED]

The ARN of the service the test belongs to.

type loggingConfiguration:

dict

param loggingConfiguration:

The updated logging configuration for the test.

  • s3BucketName (string) --

    The name of the S3 bucket for log delivery.

  • cloudWatchLogGroupArn (string) --

    The ARN of the CloudWatch Logs log group for log delivery.

  • logSchemaVersion (string) --

    The version of the log schema.

type stopConditions:

list

param stopConditions:

The updated stop conditions for the test.

  • (dict) --

    A CloudWatch alarm that automatically stops a test run if it breaches its threshold.

    • source (string) -- [REQUIRED]

      The source of the stop condition.

    • value (string) -- [REQUIRED]

      The value of the stop condition, such as the ARN of the CloudWatch alarm.

type roleName:

string

param roleName:

The updated IAM execution role name.

type parameters:

dict

param parameters:

The updated parameter values for the test.

  • (string) --

    The key of a test parameter.

    • (list) --

      • (string) --

        A value of a test parameter.

rtype:

dict

returns:

Response Syntax

{
    'test': {
        'testId': 'string',
        'testTemplateArn': 'string',
        'serviceArn': 'string',
        'name': 'string',
        'actions': [
            {
                'actionId': 'string',
                'description': 'string',
                'resourceType': 'string'
            },
        ],
        'loggingConfiguration': {
            's3BucketName': 'string',
            'cloudWatchLogGroupArn': 'string',
            'logSchemaVersion': 'string'
        },
        'stopConditions': [
            {
                'source': 'aws:cloudwatch:alarm'|'none',
                'value': 'string'
            },
        ],
        'roleName': 'string',
        'parameters': {
            'string': [
                'string',
            ]
        },
        'totalTestRuns': 123,
        'successfulTestRuns': 123,
        'creationTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • test (dict) --

      The updated test.

      • testId (string) --

        The unique identifier of the test.

      • testTemplateArn (string) --

        The ARN of the test template the test was created from.

      • serviceArn (string) --

        The ARN of the service the test belongs to.

      • name (string) --

        The name of the test.

      • actions (list) --

        The fault actions the test runs.

        • (dict) --

          Represents a fault action that a test runs, along with the resource type it targets.

          • actionId (string) --

            The identifier of the fault action.

          • description (string) --

            A description of the fault action.

          • resourceType (string) --

            The resource type that the action targets.

      • loggingConfiguration (dict) --

        The logging configuration for the test.

        • s3BucketName (string) --

          The name of the S3 bucket for log delivery.

        • cloudWatchLogGroupArn (string) --

          The ARN of the CloudWatch Logs log group for log delivery.

        • logSchemaVersion (string) --

          The version of the log schema.

      • stopConditions (list) --

        The stop conditions for the test.

        • (dict) --

          A CloudWatch alarm that automatically stops a test run if it breaches its threshold.

          • source (string) --

            The source of the stop condition.

          • value (string) --

            The value of the stop condition, such as the ARN of the CloudWatch alarm.

      • roleName (string) --

        The name of the IAM execution role used to run the test.

      • parameters (dict) --

        The parameter values configured for the test.

        • (string) --

          The key of a test parameter.

          • (list) --

            • (string) --

              A value of a test parameter.

      • totalTestRuns (integer) --

        The total number of runs of the test.

      • successfulTestRuns (integer) --

        The number of successful runs of the test.

      • creationTime (datetime) --

        The timestamp when the test was created.

DeleteTest (new) Link ¶

Deletes a test.

See also: AWS API Documentation

Request Syntax

client.delete_test(
    testId='string',
    serviceArn='string'
)
type testId:

string

param testId:

[REQUIRED]

The identifier of the test to delete.

type serviceArn:

string

param serviceArn:

[REQUIRED]

The ARN of the service the test belongs to.

rtype:

dict

returns:

Response Syntax

{
    'testId': 'string'
}

Response Structure

  • (dict) --

    • testId (string) --

      The identifier of the deleted test.

ListTestRunSources (new) Link ¶

Lists the monitoring source snapshots captured for a test run, optionally filtered by type.

See also: AWS API Documentation

Request Syntax

client.list_test_run_sources(
    testRunId='string',
    serviceArn='string',
    type='SUCCESS_CRITERIA'|'OBSERVABILITY',
    maxResults=123,
    nextToken='string'
)
type testRunId:

string

param testRunId:

[REQUIRED]

The identifier of the test run to list sources for.

type serviceArn:

string

param serviceArn:

[REQUIRED]

The ARN of the service the test run belongs to.

type type:

string

param type:

Filter sources by type.

type maxResults:

integer

param maxResults:

Pagination page size.

type nextToken:

string

param nextToken:

Pagination token.

rtype:

dict

returns:

Response Syntax

{
    'testRunSources': [
        {
            'successCriteriaAlarm': {
                'alarmArn': 'string',
                'alarmName': 'string',
                'region': 'string',
                'accountId': 'string',
                'outcome': 'PASSED'|'FAILED'|'ERROR',
                'outcomeReason': 'string'
            },
            'observabilityAlarm': {
                'alarmArn': 'string',
                'alarmName': 'string',
                'region': 'string',
                'accountId': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • testRunSources (list) --

      The list of monitoring source snapshots.

      • (dict) --

        A monitoring-source snapshot captured for a test run. Exactly one member is set.

        • successCriteriaAlarm (dict) --

          A success criteria alarm snapshot captured for the test run.

          • alarmArn (string) --

            The ARN of the CloudWatch alarm.

          • alarmName (string) --

            The name of the CloudWatch alarm.

          • region (string) --

            The Region of the CloudWatch alarm.

          • accountId (string) --

            The account ID that owns the CloudWatch alarm.

          • outcome (string) --

            The evaluation outcome of the source. Absent while the source has not yet been evaluated; set to the terminal outcome afterwards.

          • outcomeReason (string) --

            A human-readable reason for the outcome.

        • observabilityAlarm (dict) --

          An observability alarm snapshot captured for the test run.

          • alarmArn (string) --

            The ARN of the CloudWatch alarm.

          • alarmName (string) --

            The name of the CloudWatch alarm.

          • region (string) --

            The Region of the CloudWatch alarm.

          • accountId (string) --

            The account ID that owns the CloudWatch alarm.

    • nextToken (string) --

      Pagination token.

GetTest (new) Link ¶

Retrieves a test by ID.

See also: AWS API Documentation

Request Syntax

client.get_test(
    testId='string',
    serviceArn='string'
)
type testId:

string

param testId:

[REQUIRED]

The identifier of the test to retrieve.

type serviceArn:

string

param serviceArn:

[REQUIRED]

The ARN of the service the test belongs to.

rtype:

dict

returns:

Response Syntax

{
    'test': {
        'testId': 'string',
        'testTemplateArn': 'string',
        'serviceArn': 'string',
        'name': 'string',
        'actions': [
            {
                'actionId': 'string',
                'description': 'string',
                'resourceType': 'string'
            },
        ],
        'loggingConfiguration': {
            's3BucketName': 'string',
            'cloudWatchLogGroupArn': 'string',
            'logSchemaVersion': 'string'
        },
        'stopConditions': [
            {
                'source': 'aws:cloudwatch:alarm'|'none',
                'value': 'string'
            },
        ],
        'roleName': 'string',
        'parameters': {
            'string': [
                'string',
            ]
        },
        'totalTestRuns': 123,
        'successfulTestRuns': 123,
        'creationTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • test (dict) --

      The requested test.

      • testId (string) --

        The unique identifier of the test.

      • testTemplateArn (string) --

        The ARN of the test template the test was created from.

      • serviceArn (string) --

        The ARN of the service the test belongs to.

      • name (string) --

        The name of the test.

      • actions (list) --

        The fault actions the test runs.

        • (dict) --

          Represents a fault action that a test runs, along with the resource type it targets.

          • actionId (string) --

            The identifier of the fault action.

          • description (string) --

            A description of the fault action.

          • resourceType (string) --

            The resource type that the action targets.

      • loggingConfiguration (dict) --

        The logging configuration for the test.

        • s3BucketName (string) --

          The name of the S3 bucket for log delivery.

        • cloudWatchLogGroupArn (string) --

          The ARN of the CloudWatch Logs log group for log delivery.

        • logSchemaVersion (string) --

          The version of the log schema.

      • stopConditions (list) --

        The stop conditions for the test.

        • (dict) --

          A CloudWatch alarm that automatically stops a test run if it breaches its threshold.

          • source (string) --

            The source of the stop condition.

          • value (string) --

            The value of the stop condition, such as the ARN of the CloudWatch alarm.

      • roleName (string) --

        The name of the IAM execution role used to run the test.

      • parameters (dict) --

        The parameter values configured for the test.

        • (string) --

          The key of a test parameter.

          • (list) --

            • (string) --

              A value of a test parameter.

      • totalTestRuns (integer) --

        The total number of runs of the test.

      • successfulTestRuns (integer) --

        The number of successful runs of the test.

      • creationTime (datetime) --

        The timestamp when the test was created.

StopTestRun (new) Link ¶

Stops an in-progress test run.

See also: AWS API Documentation

Request Syntax

client.stop_test_run(
    testRunId='string',
    serviceArn='string'
)
type testRunId:

string

param testRunId:

[REQUIRED]

The identifier of the test run to stop.

type serviceArn:

string

param serviceArn:

[REQUIRED]

The ARN of the service the test run belongs to.

rtype:

dict

returns:

Response Syntax

{
    'testRunId': 'string',
    'status': 'INITIALIZING'|'RUNNING'|'STOPPING'|'PASSED'|'FAILED'|'STOPPED'|'ERROR'
}

Response Structure

  • (dict) --

    • testRunId (string) --

      The identifier of the stopped test run.

    • status (string) --

      The status of the test run.

ListTestTemplates (new) Link ¶

Lists the available resilience test templates. A test template is a pre-configured, AWS recommended test that defines which resilience capability to validate.

See also: AWS API Documentation

Request Syntax

client.list_test_templates()
rtype:

dict

returns:

Response Syntax

{
    'testTemplates': [
        {
            'testTemplateArn': 'string',
            'name': 'string',
            'description': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • testTemplates (list) --

      The list of test template summaries.

      • (dict) --

        Contains summary information about a test template.

        • testTemplateArn (string) --

          The ARN of the test template.

        • name (string) --

          The name of the test template.

        • description (string) --

          A description of the test template.

ListTests (new) Link ¶

Lists the tests configured for a service.

See also: AWS API Documentation

Request Syntax

client.list_tests(
    serviceArn='string',
    maxResults=123,
    nextToken='string'
)
type serviceArn:

string

param serviceArn:

[REQUIRED]

The ARN of the service to list tests for.

type maxResults:

integer

param maxResults:

Pagination page size.

type nextToken:

string

param nextToken:

Pagination token.

rtype:

dict

returns:

Response Syntax

{
    'tests': [
        {
            'testId': 'string',
            'testTemplateArn': 'string',
            'serviceArn': 'string',
            'totalTestRuns': 123,
            'successfulTestRuns': 123,
            'creationTime': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • tests (list) --

      The list of test summaries.

      • (dict) --

        Contains summary information about a test.

        • testId (string) --

          The unique identifier of the test.

        • testTemplateArn (string) --

          The ARN of the test template the test was created from.

        • serviceArn (string) --

          The ARN of the service the test belongs to.

        • totalTestRuns (integer) --

          The total number of runs of the test.

        • successfulTestRuns (integer) --

          The number of successful runs of the test.

        • creationTime (datetime) --

          The timestamp when the test was created.

    • nextToken (string) --

      Pagination token.

ListResolvedTestRunTargetResources (new) Link ¶

Lists the AWS resources that AWS Fault Injection Service (AWS FIS) resolved as targets for a test run.

See also: AWS API Documentation

Request Syntax

client.list_resolved_test_run_target_resources(
    testRunId='string',
    serviceArn='string',
    maxResults=123,
    nextToken='string'
)
type testRunId:

string

param testRunId:

[REQUIRED]

The identifier of the test run to list resolved target resources for.

type serviceArn:

string

param serviceArn:

[REQUIRED]

The ARN of the service the test run belongs to.

type maxResults:

integer

param maxResults:

Pagination page size.

type nextToken:

string

param nextToken:

Pagination token.

rtype:

dict

returns:

Response Syntax

{
    'resolvedTargetResources': [
        {
            'resourceType': 'string',
            'targetName': 'string',
            'targetInformation': {
                'string': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • resolvedTargetResources (list) --

      The list of resolved target resources.

      • (dict) --

        A single AWS resource that AWS Fault Injection Service (AWS FIS) resolved as a target during a test run.

        • resourceType (string) --

          The AWS FIS resource type the target belongs to, such as aws:ec2:instance, aws:ecs:task, or aws:eks:pod.

        • targetName (string) --

          The name of the target in the AWS FIS experiment template.

        • targetInformation (dict) --

          The raw target information map as returned by AWS FIS.

          • (string) --

            The key of a resolved target information entry.

            • (string) --

              The value of a resolved target information entry.

    • nextToken (string) --

      Pagination token.

ListTestRuns (new) Link ¶

Lists the runs of a test, or all test runs for a service.

See also: AWS API Documentation

Request Syntax

client.list_test_runs(
    serviceArn='string',
    testId='string',
    maxResults=123,
    nextToken='string'
)
type serviceArn:

string

param serviceArn:

[REQUIRED]

The ARN of the service to list test runs for.

type testId:

string

param testId:

Filter test runs by test identifier.

type maxResults:

integer

param maxResults:

Pagination page size.

type nextToken:

string

param nextToken:

Pagination token.

rtype:

dict

returns:

Response Syntax

{
    'testRuns': [
        {
            'testRunId': 'string',
            'status': 'INITIALIZING'|'RUNNING'|'STOPPING'|'PASSED'|'FAILED'|'STOPPED'|'ERROR',
            'startedAt': datetime(2015, 1, 1),
            'endedAt': datetime(2015, 1, 1),
            'testTemplateArn': 'string',
            'serviceArn': 'string',
            'errorMessage': 'string',
            'accountTargeting': 'SINGLE_ACCOUNT'|'MULTI_ACCOUNT'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • testRuns (list) --

      The list of test run summaries.

      • (dict) --

        Contains summary information about a test run.

        • testRunId (string) --

          The unique identifier of the test run.

        • status (string) --

          The current status of the test run.

        • startedAt (datetime) --

          The timestamp when the test run started.

        • endedAt (datetime) --

          The timestamp when the test run ended.

        • testTemplateArn (string) --

          The ARN of the test template the test run was based on.

        • serviceArn (string) --

          The ARN of the service the test run belongs to.

        • errorMessage (string) --

          A human-readable reason for test run failure. Only present when the status is FAILED or ERROR.

        • accountTargeting (string) --

          Indicates whether this test run targets a single account or multiple accounts.

    • nextToken (string) --

      Pagination token.

CreateTest (new) Link ¶

Creates a test for a service by configuring a test template. Each service has one test per template.

See also: AWS API Documentation

Request Syntax

client.create_test(
    serviceArn='string',
    testTemplateArn='string',
    loggingConfiguration={
        's3BucketName': 'string',
        'cloudWatchLogGroupArn': 'string',
        'logSchemaVersion': 'string'
    },
    stopConditions=[
        {
            'source': 'aws:cloudwatch:alarm'|'none',
            'value': 'string'
        },
    ],
    roleName='string',
    parameters={
        'string': [
            'string',
        ]
    }
)
type serviceArn:

string

param serviceArn:

[REQUIRED]

The ARN of the service to create the test for.

type testTemplateArn:

string

param testTemplateArn:

[REQUIRED]

The ARN of the test template to configure.

type loggingConfiguration:

dict

param loggingConfiguration:

The logging configuration for the test.

  • s3BucketName (string) --

    The name of the S3 bucket for log delivery.

  • cloudWatchLogGroupArn (string) --

    The ARN of the CloudWatch Logs log group for log delivery.

  • logSchemaVersion (string) --

    The version of the log schema.

type stopConditions:

list

param stopConditions:

The stop conditions for the test.

  • (dict) --

    A CloudWatch alarm that automatically stops a test run if it breaches its threshold.

    • source (string) -- [REQUIRED]

      The source of the stop condition.

    • value (string) -- [REQUIRED]

      The value of the stop condition, such as the ARN of the CloudWatch alarm.

type roleName:

string

param roleName:

The name of the IAM execution role to use when running the test.

type parameters:

dict

param parameters:

The parameter values for the test.

  • (string) --

    The key of a test parameter.

    • (list) --

      • (string) --

        A value of a test parameter.

rtype:

dict

returns:

Response Syntax

{
    'test': {
        'testId': 'string',
        'testTemplateArn': 'string',
        'serviceArn': 'string',
        'name': 'string',
        'actions': [
            {
                'actionId': 'string',
                'description': 'string',
                'resourceType': 'string'
            },
        ],
        'loggingConfiguration': {
            's3BucketName': 'string',
            'cloudWatchLogGroupArn': 'string',
            'logSchemaVersion': 'string'
        },
        'stopConditions': [
            {
                'source': 'aws:cloudwatch:alarm'|'none',
                'value': 'string'
            },
        ],
        'roleName': 'string',
        'parameters': {
            'string': [
                'string',
            ]
        },
        'totalTestRuns': 123,
        'successfulTestRuns': 123,
        'creationTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • test (dict) --

      The created test.

      • testId (string) --

        The unique identifier of the test.

      • testTemplateArn (string) --

        The ARN of the test template the test was created from.

      • serviceArn (string) --

        The ARN of the service the test belongs to.

      • name (string) --

        The name of the test.

      • actions (list) --

        The fault actions the test runs.

        • (dict) --

          Represents a fault action that a test runs, along with the resource type it targets.

          • actionId (string) --

            The identifier of the fault action.

          • description (string) --

            A description of the fault action.

          • resourceType (string) --

            The resource type that the action targets.

      • loggingConfiguration (dict) --

        The logging configuration for the test.

        • s3BucketName (string) --

          The name of the S3 bucket for log delivery.

        • cloudWatchLogGroupArn (string) --

          The ARN of the CloudWatch Logs log group for log delivery.

        • logSchemaVersion (string) --

          The version of the log schema.

      • stopConditions (list) --

        The stop conditions for the test.

        • (dict) --

          A CloudWatch alarm that automatically stops a test run if it breaches its threshold.

          • source (string) --

            The source of the stop condition.

          • value (string) --

            The value of the stop condition, such as the ARN of the CloudWatch alarm.

      • roleName (string) --

        The name of the IAM execution role used to run the test.

      • parameters (dict) --

        The parameter values configured for the test.

        • (string) --

          The key of a test parameter.

          • (list) --

            • (string) --

              A value of a test parameter.

      • totalTestRuns (integer) --

        The total number of runs of the test.

      • successfulTestRuns (integer) --

        The number of successful runs of the test.

      • creationTime (datetime) --

        The timestamp when the test was created.

GetTestRun (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.get_test_run(
    testRunId='string',
    serviceArn='string'
)
type testRunId:

string

param testRunId:

[REQUIRED]

The identifier of the test run to retrieve.

type serviceArn:

string

param serviceArn:

[REQUIRED]

The ARN of the service the test run belongs to.

rtype:

dict

returns:

Response Syntax

{
    'testRun': {
        'testRunId': 'string',
        'testId': 'string',
        'status': 'INITIALIZING'|'RUNNING'|'STOPPING'|'PASSED'|'FAILED'|'STOPPED'|'ERROR',
        'serviceArn': 'string',
        'startedAt': datetime(2015, 1, 1),
        'endedAt': datetime(2015, 1, 1),
        'experiments': [
            {
                'experimentArn': 'string',
                'details': 'string'
            },
        ],
        'eventCount': 123,
        'parameters': {
            'string': [
                'string',
            ]
        },
        'errorMessage': 'string',
        'stopConditions': [
            {
                'source': 'aws:cloudwatch:alarm'|'none',
                'value': 'string'
            },
        ],
        'loggingConfiguration': {
            's3BucketName': 'string',
            'cloudWatchLogGroupArn': 'string',
            'logSchemaVersion': 'string'
        },
        'roleName': 'string',
        'testTemplateArn': 'string',
        'reportConfiguration': {
            'reportOutput': [
                {
                    's3': {
                        'bucketPath': 'string',
                        'bucketOwner': 'string'
                    }
                },
            ]
        },
        'policy': {
            'policyArn': 'string',
            'name': 'string',
            'availabilitySlo': {
                'target': 123.0
            },
            'multiAz': {
                'rtoInMinutes': 123,
                'rpoInMinutes': 123,
                'disasterRecoveryApproach': 'ACTIVE_ACTIVE'|'HOT_STANDBY'|'WARM_STANDBY'|'PILOT_LIGHT'|'BACKUP_AND_RESTORE'
            },
            'multiRegion': {
                'rtoInMinutes': 123,
                'rpoInMinutes': 123,
                'disasterRecoveryApproach': 'ACTIVE_ACTIVE'|'HOT_STANDBY'|'WARM_STANDBY'|'PILOT_LIGHT'|'BACKUP_AND_RESTORE'
            },
            'dataRecovery': {
                'timeBetweenBackupsInMinutes': 123
            }
        },
        'reportOutput': {
            'reportType': 'FAILURE_MODE'|'TESTING',
            'status': 'PENDING'|'SUCCEEDED'|'FAILED',
            'serviceArn': 'string',
            'assessmentId': 'string',
            'testRunId': 'string',
            'testTemplateArn': 'string',
            'createdAt': datetime(2015, 1, 1),
            'reportOutput': {
                's3ReportOutput': {
                    's3ObjectKey': 'string'
                },
                'failedReportOutput': {
                    'errorCode': 'INSUFFICIENT_PERMISSIONS'|'CONFIGURATION_ERROR'|'INTERNAL_ERROR',
                    'errorMessage': 'string'
                }
            }
        },
        'regionSwitchPlanArn': 'string',
        'regionSwitchExecutionId': 'string',
        'permissionModel': {
            'invokerRoleName': 'string',
            'crossAccountRoles': [
                {
                    'crossAccountRoleArn': 'string',
                    'externalId': 'string'
                },
            ]
        },
        'regions': [
            'string',
        ],
        'accountTargeting': 'SINGLE_ACCOUNT'|'MULTI_ACCOUNT'
    }
}

Response Structure

  • (dict) --

    • testRun (dict) --

      The requested test run.

      • testRunId (string) --

        The unique identifier of the test run.

      • testId (string) --

        The identifier of the test that was run.

      • status (string) --

        The current status of the test run.

      • serviceArn (string) --

        The ARN of the service the test run belongs to.

      • startedAt (datetime) --

        The timestamp when the test run started.

      • endedAt (datetime) --

        The timestamp when the test run ended.

      • experiments (list) --

        The AWS Fault Injection Service (AWS FIS) experiments run as part of the test run.

        • (dict) --

          Details about an AWS Fault Injection Service (AWS FIS) experiment run as part of a test run.

          • experimentArn (string) --

            The ARN of the AWS FIS experiment.

          • details (string) --

            Additional details about the experiment.

      • eventCount (integer) --

        The number of events recorded for the test run. Use ListTestRunEvents to retrieve the details.

      • parameters (dict) --

        The parameter values used for the test run.

        • (string) --

          The key of a test parameter.

          • (list) --

            • (string) --

              A value of a test parameter.

      • errorMessage (string) --

        A human-readable reason for test run failure. Only present when the status is FAILED or ERROR.

      • stopConditions (list) --

        The stop conditions snapshotted from the test when the run was started.

        • (dict) --

          A CloudWatch alarm that automatically stops a test run if it breaches its threshold.

          • source (string) --

            The source of the stop condition.

          • value (string) --

            The value of the stop condition, such as the ARN of the CloudWatch alarm.

      • loggingConfiguration (dict) --

        The logging configuration snapshotted from the test when the run was started.

        • s3BucketName (string) --

          The name of the S3 bucket for log delivery.

        • cloudWatchLogGroupArn (string) --

          The ARN of the CloudWatch Logs log group for log delivery.

        • logSchemaVersion (string) --

          The version of the log schema.

      • roleName (string) --

        The IAM execution role name snapshotted from the test when the run was started.

      • testTemplateArn (string) --

        The ARN of the test template snapshotted from the test when the run was started.

      • reportConfiguration (dict) --

        The report configuration snapshotted from the service when the run was started.

        • reportOutput (list) --

          The output destinations for generated reports.

          • (dict) --

            Configuration for a report output destination.

            • s3 (dict) --

              S3 configuration for report output.

              • bucketPath (string) --

                S3 bucket path where reports will be written (e.g., my-bucket/ngrh-reports/).

              • bucketOwner (string) --

                Account ID of the bucket owner for cross-account access verification.

      • policy (dict) --

        The resilience policy snapshotted from the service when the run was started.

        • policyArn (string) --

          The ARN of the policy.

        • name (string) --

          The name of the policy.

        • availabilitySlo (dict) --

          The availability SLO targets.

          • target (float) --

            The target availability percentage, expressed as a value between 0 and 100.

        • multiAz (dict) --

          The multi-AZ resilience targets.

          • rtoInMinutes (integer) --

            The recovery time objective (RTO) target for multi-AZ, in minutes.

          • rpoInMinutes (integer) --

            The recovery point objective (RPO) target for multi-AZ, in minutes.

          • disasterRecoveryApproach (string) --

            The disaster recovery approach for multi-AZ.

        • multiRegion (dict) --

          The multi-Region resilience targets.

          • rtoInMinutes (integer) --

            The recovery time objective (RTO) target for multi-Region, in minutes.

          • rpoInMinutes (integer) --

            The recovery point objective (RPO) target for multi-Region, in minutes.

          • disasterRecoveryApproach (string) --

            The disaster recovery approach for multi-Region.

        • dataRecovery (dict) --

          The data recovery targets.

          • timeBetweenBackupsInMinutes (integer) --

            The target time between backups, in minutes.

      • reportOutput (dict) --

        The report generation result for the test run. Present after report generation completes or fails.

        • reportType (string) --

          The type of the generated report.

        • status (string) --

          The status of the report generation.

        • serviceArn (string) --

          The service this report was generated for.

        • assessmentId (string) --

          Present for FAILURE_MODE reports.

        • testRunId (string) --

          The unique identifier of a test run.

        • testTemplateArn (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.

        • createdAt (datetime) --

          The timestamp when the report was created.

        • reportOutput (dict) --

          Present when status is SUCCEEDED or FAILED.

          • s3ReportOutput (dict) --

            The S3 location where the report was written.

            • s3ObjectKey (string) --

              The S3 object key for the generated report.

          • failedReportOutput (dict) --

            Details when report generation failed.

            • errorCode (string) --

              The error code describing why the report generation failed.

            • errorMessage (string) --

              The error message describing why the report generation failed.

      • regionSwitchPlanArn (string) --

        The ARN of the ARC Region switch plan associated with the test run.

      • regionSwitchExecutionId (string) --

        The identifier of the ARC Region switch execution detected during the test run.

      • permissionModel (dict) --

        The permission model snapshotted from the service when the run was started.

        • invokerRoleName (string) --

          IAM role name (supports up to 64 characters per IAM limits).

        • crossAccountRoles (list) --

          The list of cross-account IAM role ARNs.

          • (dict) --

            Specifies a cross-account IAM role ARN and optional external ID.

            • crossAccountRoleArn (string) --

              ARN of the IAM Role for the profile. Null if the permission profile is the 'Admin' profile.

            • externalId (string) --

              The external ID used for assuming the cross-account role.

      • regions (list) --

        The Regions snapshotted from the service when the run was started.

        • (string) --

      • accountTargeting (string) --

        Indicates whether this test run targets a single account or multiple accounts.

ListTestSources (new) Link ¶

Lists the monitoring sources attached to a test, optionally filtered by type.

See also: AWS API Documentation

Request Syntax

client.list_test_sources(
    testId='string',
    serviceArn='string',
    type='SUCCESS_CRITERIA'|'OBSERVABILITY',
    maxResults=123,
    nextToken='string'
)
type testId:

string

param testId:

[REQUIRED]

The identifier of the test to list sources for.

type serviceArn:

string

param serviceArn:

[REQUIRED]

The ARN of the service the test belongs to.

type type:

string

param type:

Filter sources by type.

type maxResults:

integer

param maxResults:

Pagination page size.

type nextToken:

string

param nextToken:

Pagination token.

rtype:

dict

returns:

Response Syntax

{
    'testSources': [
        {
            'successCriteriaAlarm': {
                'alarmArn': 'string',
                'alarmName': 'string',
                'region': 'string',
                'accountId': 'string',
                'createdAt': datetime(2015, 1, 1)
            },
            'observabilityAlarm': {
                'alarmArn': 'string',
                'alarmName': 'string',
                'region': 'string',
                'accountId': 'string',
                'createdAt': datetime(2015, 1, 1)
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • testSources (list) --

      The list of configured monitoring sources.

      • (dict) --

        A configured monitoring source returned by ListTestSources. Exactly one member is set.

        • successCriteriaAlarm (dict) --

          A configured success criteria alarm.

          • alarmArn (string) --

            The ARN of the CloudWatch alarm.

          • alarmName (string) --

            The name of the CloudWatch alarm.

          • region (string) --

            The Region of the CloudWatch alarm.

          • accountId (string) --

            The account ID that owns the CloudWatch alarm.

          • createdAt (datetime) --

            The timestamp when the source was configured.

        • observabilityAlarm (dict) --

          A configured observability alarm.

          • alarmArn (string) --

            The ARN of the CloudWatch alarm.

          • alarmName (string) --

            The name of the CloudWatch alarm.

          • region (string) --

            The Region of the CloudWatch alarm.

          • accountId (string) --

            The account ID that owns the CloudWatch alarm.

          • createdAt (datetime) --

            The timestamp when the source was configured.

    • nextToken (string) --

      Pagination token.

DeleteTestSources (new) Link ¶

Removes monitoring sources from a test. The operation is transactional and idempotent — removing a source that is not attached is a no-op.

See also: AWS API Documentation

Request Syntax

client.delete_test_sources(
    testId='string',
    serviceArn='string',
    testSources=[
        {
            'successCriteriaAlarm': {
                'alarmArn': 'string'
            },
            'observabilityAlarm': {
                'alarmArn': 'string'
            }
        },
    ]
)
type testId:

string

param testId:

[REQUIRED]

The identifier of the test to remove sources from.

type serviceArn:

string

param serviceArn:

[REQUIRED]

The ARN of the service the test belongs to.

type testSources:

list

param testSources:

[REQUIRED]

The monitoring sources to remove.

  • (dict) --

    Identifies a monitoring source to add to or remove from a test. Exactly one member is set.

    • successCriteriaAlarm (dict) --

      A success criteria alarm that determines whether the test passes or fails.

      • alarmArn (string) -- [REQUIRED]

        The ARN of the CloudWatch alarm.

    • observabilityAlarm (dict) --

      An observability alarm included for visibility only.

      • alarmArn (string) -- [REQUIRED]

        The ARN of the CloudWatch alarm.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

PutTestSources (new) Link ¶

Adds or updates the monitoring sources on a test. The operation is transactional — either every source is written or the call fails and nothing is written.

See also: AWS API Documentation

Request Syntax

client.put_test_sources(
    testId='string',
    serviceArn='string',
    testSources=[
        {
            'successCriteriaAlarm': {
                'alarmArn': 'string'
            },
            'observabilityAlarm': {
                'alarmArn': 'string'
            }
        },
    ]
)
type testId:

string

param testId:

[REQUIRED]

The identifier of the test to add sources to.

type serviceArn:

string

param serviceArn:

[REQUIRED]

The ARN of the service the test belongs to.

type testSources:

list

param testSources:

[REQUIRED]

The monitoring sources to add or update.

  • (dict) --

    Identifies a monitoring source to add to or remove from a test. Exactly one member is set.

    • successCriteriaAlarm (dict) --

      A success criteria alarm that determines whether the test passes or fails.

      • alarmArn (string) -- [REQUIRED]

        The ARN of the CloudWatch alarm.

    • observabilityAlarm (dict) --

      An observability alarm included for visibility only.

      • alarmArn (string) -- [REQUIRED]

        The ARN of the CloudWatch alarm.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

ListTestRunEvents (new) Link ¶

Lists the events in a test run's timeline.

See also: AWS API Documentation

Request Syntax

client.list_test_run_events(
    testRunId='string',
    serviceArn='string',
    startedAt=datetime(2015, 1, 1),
    endedAt=datetime(2015, 1, 1),
    maxResults=123,
    nextToken='string'
)
type testRunId:

string

param testRunId:

[REQUIRED]

The identifier of the test run to list events for.

type serviceArn:

string

param serviceArn:

[REQUIRED]

The ARN of the service the test run belongs to.

type startedAt:

datetime

param startedAt:

Return events at or after this timestamp.

type endedAt:

datetime

param endedAt:

Return events at or before this timestamp.

type maxResults:

integer

param maxResults:

Pagination page size.

type nextToken:

string

param nextToken:

Pagination token.

rtype:

dict

returns:

Response Syntax

{
    'events': [
        {
            'eventId': 'string',
            'eventType': 'string',
            'message': 'string',
            'timestamp': datetime(2015, 1, 1),
            'attributes': {
                'string': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • events (list) --

      The list of test run events.

      • (dict) --

        A single event in a test run's timeline.

        • eventId (string) --

          The unique identifier of the event.

        • eventType (string) --

          The type of the event, such as action_started, action_completed, or rto_recovery_detected.

        • message (string) --

          A human-readable description of what happened.

        • timestamp (datetime) --

          The timestamp when the event occurred.

        • attributes (dict) --

          Machine-parseable key-value attributes for the event.

          • (string) --

            The key of a test run event attribute.

            • (string) --

              The value of a test run event attribute.

    • nextToken (string) --

      Pagination token.

StartTestRun (new) Link ¶

Starts a run of a test. Each run scopes to the current resources in the service and produces a pass or fail outcome.

See also: AWS API Documentation

Request Syntax

client.start_test_run(
    testId='string',
    serviceArn='string'
)
type testId:

string

param testId:

[REQUIRED]

The identifier of the test to run.

type serviceArn:

string

param serviceArn:

[REQUIRED]

The ARN of the service the test belongs to.

rtype:

dict

returns:

Response Syntax

{
    'testRunId': 'string',
    'status': 'INITIALIZING'|'RUNNING'|'STOPPING'|'PASSED'|'FAILED'|'STOPPED'|'ERROR',
    'experimentArns': [
        'string',
    ]
}

Response Structure

  • (dict) --

    • testRunId (string) --

      The identifier of the started test run.

    • status (string) --

      The status of the started test run.

    • experimentArns (list) --

      The ARNs of the AWS Fault Injection Service (AWS FIS) experiments started for the run.

      • (string) --

        ARN identifier.

GetTestTemplate (new) Link ¶

Retrieves a resilience test template by ARN, including the parameters it accepts and the fault actions it runs.

See also: AWS API Documentation

Request Syntax

client.get_test_template(
    testTemplateArn='string'
)
type testTemplateArn:

string

param testTemplateArn:

[REQUIRED]

The ARN of the test template to retrieve.

rtype:

dict

returns:

Response Syntax

{
    'testTemplate': {
        'testTemplateArn': 'string',
        'name': 'string',
        'description': 'string',
        'parameters': [
            {
                'name': 'string',
                'description': 'string',
                'type': 'STRING'|'STRING_LIST'|'INTEGER',
                'required': True|False,
                'defaultValue': 'string',
                'maxValues': 123
            },
        ],
        'actions': [
            {
                'actionId': 'string',
                'description': 'string',
                'resourceType': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • testTemplate (dict) --

      The requested test template.

      • testTemplateArn (string) --

        The ARN of the test template.

      • name (string) --

        The name of the test template.

      • description (string) --

        A description of the test template.

      • parameters (list) --

        The parameters the test template accepts.

        • (dict) --

          Describes a parameter accepted by a test template.

          • name (string) --

            The name of the parameter.

          • description (string) --

            A description of the parameter.

          • type (string) --

            The data type of the parameter.

          • required (boolean) --

            Indicates whether the parameter is required.

          • defaultValue (string) --

            The default value of the parameter.

          • maxValues (integer) --

            The maximum number of values the parameter accepts.

      • actions (list) --

        The fault actions the test template runs.

        • (dict) --

          Represents a fault action that a test runs, along with the resource type it targets.

          • actionId (string) --

            The identifier of the fault action.

          • description (string) --

            A description of the fault action.

          • resourceType (string) --

            The resource type that the action targets.

CreateReport (updated) Link ¶
Changes (request, response)
Request
{'reportType': {'TESTING'}}
Response
{'reportGenerationResult': {'reportType': {'TESTING'},
                            'testRunId': 'string',
                            'testTemplateArn': 'string'}}

On-demand report creation. Idempotent — duplicate requests with same clientToken return existing result.

See also: AWS API Documentation

Request Syntax

client.create_report(
    serviceArn='string',
    reportType='FAILURE_MODE'|'TESTING',
    clientToken='string'
)
type serviceArn:

string

param serviceArn:

[REQUIRED]

ARN identifier.

type reportType:

string

param reportType:

[REQUIRED]

The type of report to generate.

type clientToken:

string

param clientToken:

Idempotency token.

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'reportGenerationResult': {
        'reportType': 'FAILURE_MODE'|'TESTING',
        'status': 'PENDING'|'SUCCEEDED'|'FAILED',
        'serviceArn': 'string',
        'assessmentId': 'string',
        'testRunId': 'string',
        'testTemplateArn': 'string',
        'createdAt': datetime(2015, 1, 1),
        'reportOutput': {
            's3ReportOutput': {
                's3ObjectKey': 'string'
            },
            'failedReportOutput': {
                'errorCode': 'INSUFFICIENT_PERMISSIONS'|'CONFIGURATION_ERROR'|'INTERNAL_ERROR',
                'errorMessage': 'string'
            }
        }
    }
}

Response Structure

  • (dict) --

    • reportGenerationResult (dict) --

      The result of the report generation request.

      • reportType (string) --

        The type of the generated report.

      • status (string) --

        The status of the report generation.

      • serviceArn (string) --

        The service this report was generated for.

      • assessmentId (string) --

        Present for FAILURE_MODE reports.

      • testRunId (string) --

        The unique identifier of a test run.

      • testTemplateArn (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.

      • createdAt (datetime) --

        The timestamp when the report was created.

      • reportOutput (dict) --

        Present when status is SUCCEEDED or FAILED.

        • s3ReportOutput (dict) --

          The S3 location where the report was written.

          • s3ObjectKey (string) --

            The S3 object key for the generated report.

        • failedReportOutput (dict) --

          Details when report generation failed.

          • errorCode (string) --

            The error code describing why the report generation failed.

          • errorMessage (string) --

            The error message describing why the report generation failed.

ListReports (updated) Link ¶
Changes (request, response)
Request
{'reportType': {'TESTING'}, 'testRunId': 'string'}
Response
{'reportGenerationResults': {'reportType': {'TESTING'},
                             'testRunId': 'string',
                             'testTemplateArn': 'string'}}

List reports for a service, or all reports owned by the account if serviceArn is not provided.

See also: AWS API Documentation

Request Syntax

client.list_reports(
    serviceArn='string',
    reportType='FAILURE_MODE'|'TESTING',
    testRunId='string',
    maxResults=123,
    nextToken='string'
)
type serviceArn:

string

param serviceArn:

Optional. If not provided, lists all reports owned by the account.

type reportType:

string

param reportType:

Filter reports by type.

type testRunId:

string

param testRunId:

The unique identifier of a test run.

type maxResults:

integer

param maxResults:

Pagination page size.

type nextToken:

string

param nextToken:

Pagination token.

rtype:

dict

returns:

Response Syntax

{
    'reportGenerationResults': [
        {
            'reportType': 'FAILURE_MODE'|'TESTING',
            'status': 'PENDING'|'SUCCEEDED'|'FAILED',
            'serviceArn': 'string',
            'assessmentId': 'string',
            'testRunId': 'string',
            'testTemplateArn': 'string',
            'createdAt': datetime(2015, 1, 1),
            'reportOutput': {
                's3ReportOutput': {
                    's3ObjectKey': 'string'
                },
                'failedReportOutput': {
                    'errorCode': 'INSUFFICIENT_PERMISSIONS'|'CONFIGURATION_ERROR'|'INTERNAL_ERROR',
                    'errorMessage': 'string'
                }
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • reportGenerationResults (list) --

      The list of report generation results.

      • (dict) --

        Result of a report generation attempt.

        • reportType (string) --

          The type of the generated report.

        • status (string) --

          The status of the report generation.

        • serviceArn (string) --

          The service this report was generated for.

        • assessmentId (string) --

          Present for FAILURE_MODE reports.

        • testRunId (string) --

          The unique identifier of a test run.

        • testTemplateArn (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.

        • createdAt (datetime) --

          The timestamp when the report was created.

        • reportOutput (dict) --

          Present when status is SUCCEEDED or FAILED.

          • s3ReportOutput (dict) --

            The S3 location where the report was written.

            • s3ObjectKey (string) --

              The S3 object key for the generated report.

          • failedReportOutput (dict) --

            Details when report generation failed.

            • errorCode (string) --

              The error code describing why the report generation failed.

            • errorMessage (string) --

              The error message describing why the report generation failed.

    • nextToken (string) --

      Pagination token.