Synthetics / Client / get_canary_runs

get_canary_runs#

Synthetics.Client.get_canary_runs(**kwargs)#

Retrieves a list of runs for a specified canary.

See also: AWS API Documentation

Request Syntax

response = client.get_canary_runs(
    Name='string',
    NextToken='string',
    MaxResults=123
)
Parameters:
  • Name (string) –

    [REQUIRED]

    The name of the canary that you want to see runs for.

  • NextToken (string) – A token that indicates that there is more data available. You can use this token in a subsequent GetCanaryRuns operation to retrieve the next set of results.

  • MaxResults (integer) – Specify this parameter to limit how many runs are returned each time you use the GetCanaryRuns operation. If you omit this parameter, the default of 100 is used.

Return type:

dict

Returns:

Response Syntax

{
    'CanaryRuns': [
        {
            'Id': 'string',
            'Name': 'string',
            'Status': {
                'State': 'RUNNING'|'PASSED'|'FAILED',
                'StateReason': 'string',
                'StateReasonCode': 'CANARY_FAILURE'|'EXECUTION_FAILURE'
            },
            'Timeline': {
                'Started': datetime(2015, 1, 1),
                'Completed': datetime(2015, 1, 1)
            },
            'ArtifactS3Location': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • CanaryRuns (list) –

      An array of structures. Each structure contains the details of one of the retrieved canary runs.

      • (dict) –

        This structure contains the details about one run of one canary.

        • Id (string) –

          A unique ID that identifies this canary run.

        • Name (string) –

          The name of the canary.

        • Status (dict) –

          The status of this run.

          • State (string) –

            The current state of the run.

          • StateReason (string) –

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

          • StateReasonCode (string) –

            If this value is CANARY_FAILURE, an exception occurred in the canary code. If this value is EXECUTION_FAILURE, an exception occurred in CloudWatch Synthetics.

        • Timeline (dict) –

          A structure that contains the start and end times of this run.

          • Started (datetime) –

            The start time of the run.

          • Completed (datetime) –

            The end time of the run.

        • ArtifactS3Location (string) –

          The location where the canary stored artifacts from the run. Artifacts include the log file, screenshots, and HAR files.

    • NextToken (string) –

      A token that indicates that there is more data available. You can use this token in a subsequent GetCanaryRuns operation to retrieve the next set of results.

Exceptions

  • Synthetics.Client.exceptions.InternalServerException

  • Synthetics.Client.exceptions.ValidationException

  • Synthetics.Client.exceptions.ResourceNotFoundException