Skip to content

CanaryRunStatus

Source code in docs_src/capo_synthetics/types/canary_run_status.py
class CanaryRunStatus(TypedDict, closed=True):
    state: NotRequired["capo_synthetics.types.canary_run_state.CanaryRunState"]
    """<p>The current state of the run.</p>"""
    state_reason: NotRequired["capo_synthetics.types.string.String"]
    """<p>If run of the canary failed, this field contains the reason for the error.</p>"""
    state_reason_code: NotRequired[
        "capo_synthetics.types.canary_run_state_reason_code.CanaryRunStateReasonCode"
    ]
    """<p>If this value is <code>CANARY_FAILURE</code>, either the canary script failed or Synthetics ran into a fatal error when running the canary. For example, a canary timeout misconfiguration setting can cause the canary to timeout before Synthetics can evaluate its status. </p> <p> If this value is <code>EXECUTION_FAILURE</code>, a non-critical failure occurred such as failing to save generated debug artifacts (for example, screenshots or har files).</p> <p>If both types of failures occurred, the <code>CANARY_FAILURE</code> takes precedence. To understand the exact error, use the <a href="https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_CanaryRunStatus.html">StateReason</a> API.</p>"""
    test_result: NotRequired[
        "capo_synthetics.types.canary_run_test_result.CanaryRunTestResult"
    ]
    """<p>Specifies the status of canary script for this run. When Synthetics tries to determine the status but fails, the result is marked as <code>UNKNOWN</code>. For the overall status of canary run, see <a href="https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_CanaryRunStatus.html">State</a>.</p>"""

state instance-attribute

state: NotRequired[CanaryRunState]

The current state of the run.

state_reason instance-attribute

state_reason: NotRequired[String]

If run of the canary failed, this field contains the reason for the error.

state_reason_code instance-attribute

state_reason_code: NotRequired[CanaryRunStateReasonCode]

If this value is CANARY_FAILURE, either the canary script failed or Synthetics ran into a fatal error when running the canary. For example, a canary timeout misconfiguration setting can cause the canary to timeout before Synthetics can evaluate its status.

If this value is EXECUTION_FAILURE, a non-critical failure occurred such as failing to save generated debug artifacts (for example, screenshots or har files).

If both types of failures occurred, the CANARY_FAILURE takes precedence. To understand the exact error, use the StateReason API.

test_result instance-attribute

test_result: NotRequired[CanaryRunTestResult]

Specifies the status of canary script for this run. When Synthetics tries to determine the status but fails, the result is marked as UNKNOWN. For the overall status of canary run, see State.