Skip to content

Canary

Source code in docs_src/capo_synthetics/types/canary.py
class Canary(TypedDict, closed=True):
    id: NotRequired["capo_synthetics.types.uuid.UUID"]
    """<p>The unique ID of this canary.</p>"""
    name: NotRequired["capo_synthetics.types.canary_name.CanaryName"]
    """<p>The name of the canary.</p>"""
    code: NotRequired["capo_synthetics.types.canary_code_output.CanaryCodeOutput"]
    execution_role_arn: NotRequired["capo_synthetics.types.role_arn.RoleArn"]
    """<p>The ARN of the IAM role used to run the canary. This role must include <code>lambda.amazonaws.com</code> as a principal in the trust policy.</p>"""
    schedule: NotRequired[
        "capo_synthetics.types.canary_schedule_output.CanaryScheduleOutput"
    ]
    """<p>A structure that contains information about how often the canary is to run, and when these runs are to stop.</p>"""
    run_config: NotRequired[
        "capo_synthetics.types.canary_run_config_output.CanaryRunConfigOutput"
    ]
    success_retention_period_in_days: NotRequired[
        "capo_synthetics.types.max_size1024.MaxSize1024"
    ]
    """<p>The number of days to retain data about successful runs of this canary.</p> <p>This setting affects the range of information returned by <a href="https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_GetCanaryRuns.html">GetCanaryRuns</a>, as well as the range of information displayed in the Synthetics console. </p>"""
    failure_retention_period_in_days: NotRequired[
        "capo_synthetics.types.max_size1024.MaxSize1024"
    ]
    """<p>The number of days to retain data about failed runs of this canary.</p> <p>This setting affects the range of information returned by <a href="https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_GetCanaryRuns.html">GetCanaryRuns</a>, as well as the range of information displayed in the Synthetics console. </p>"""
    status: NotRequired["capo_synthetics.types.canary_status.CanaryStatus"]
    """<p>A structure that contains information about the canary's status.</p>"""
    timeline: NotRequired["capo_synthetics.types.canary_timeline.CanaryTimeline"]
    """<p>A structure that contains information about when the canary was created, modified, and most recently run.</p>"""
    artifact_s3_location: NotRequired["capo_synthetics.types.string.String"]
    """<p>The location in Amazon S3 where Synthetics stores artifacts from the runs of this canary. Artifacts include the log file, screenshots, and HAR files.</p>"""
    engine_arn: NotRequired["capo_synthetics.types.function_arn.FunctionArn"]
    """<p>The ARN of the Lambda function that is used as your canary's engine. For more information about Lambda ARN format, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-api-permissions-ref.html">Resources and Conditions for Lambda Actions</a>.</p>"""
    runtime_version: NotRequired["capo_synthetics.types.string.String"]
    """<p>Specifies the runtime version to use for the canary. For more information about runtime versions, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html"> Canary Runtime Versions</a>.</p>"""
    vpc_config: NotRequired["capo_synthetics.types.vpc_config_output.VpcConfigOutput"]
    visual_reference: NotRequired[
        "capo_synthetics.types.visual_reference_output.VisualReferenceOutput"
    ]
    """<p>If this canary performs visual monitoring by comparing screenshots, this structure contains the ID of the canary run to use as the baseline for screenshots, and the coordinates of any parts of the screen to ignore during the visual monitoring comparison.</p>"""
    provisioned_resource_cleanup: NotRequired[
        "capo_synthetics.types.provisioned_resource_cleanup_setting.ProvisionedResourceCleanupSetting"
    ]
    """<p>Specifies whether to also delete the Lambda functions and layers used by this canary when the canary is deleted. If it is <code>AUTOMATIC</code>, the Lambda functions and layers will be deleted when the canary is deleted.</p> <p>If the value of this parameter is <code>OFF</code>, then the value of the <code>DeleteLambda</code> parameter of the <a href="https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_DeleteCanary.html">DeleteCanary</a> operation determines whether the Lambda functions and layers will be deleted.</p>"""
    browser_configs: NotRequired["capo_synthetics.types.browser_configs.BrowserConfigs"]
    """<p>A structure that specifies the browser type to use for a canary run. CloudWatch Synthetics supports running canaries on both <code>CHROME</code> and <code>FIREFOX</code> browsers.</p> <note> <p>If not specified, <code>browserConfigs</code> defaults to Chrome.</p> </note>"""
    engine_configs: NotRequired["capo_synthetics.types.engine_configs.EngineConfigs"]
    """<p>A list of engine configurations for the canary, one for each browser type that the canary is configured to run on.</p> <p>All runtime versions <code>syn-nodejs-puppeteer-11.0</code> and above, and <code>syn-nodejs-playwright-3.0</code> and above, use <code>engineConfigs</code> only. You can no longer use <code>engineArn</code> in these versions.</p> <p>Runtime versions older than <code>syn-nodejs-puppeteer-11.0</code> and <code>syn-nodejs-playwright-3.0</code> continue to support <code>engineArn</code> to ensure backward compatibility.</p>"""
    visual_references: NotRequired[
        "capo_synthetics.types.visual_references_output.VisualReferencesOutput"
    ]
    """<p>A list of visual reference configurations for the canary, one for each browser type that the canary is configured to run on. Visual references are used for visual monitoring comparisons.</p> <p> <code>syn-nodejs-puppeteer-11.0</code> and above, and <code>syn-nodejs-playwright-3.0</code> and above, only supports <code>visualReferences</code>. <code>visualReference</code> field is not supported.</p> <p>Versions older than <code>syn-nodejs-puppeteer-11.0</code> supports both <code>visualReference</code> and <code>visualReferences</code> for backward compatibility. It is recommended to use <code>visualReferences</code> for consistency and future compatibility.</p>"""
    multi_location_config: NotRequired[
        "capo_synthetics.types.multi_location_config.MultiLocationConfig"
    ]
    """<p>If this canary is part of a multi-location configuration, this structure contains information about the canary's location type, primary location, and replicas.</p>"""
    tags: NotRequired["capo_synthetics.types.tag_map.TagMap"]
    """<p>The list of key-value pairs that are associated with the canary.</p>"""
    artifact_config: NotRequired[
        "capo_synthetics.types.artifact_config_output.ArtifactConfigOutput"
    ]
    """<p>A structure that contains the configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3.</p>"""
    kms_key_arn: NotRequired["capo_synthetics.types.kms_key_arn.KmsKeyArn"]
    """<p>The Amazon Resource Name (ARN) of the customer-managed AWS Key Management Service (AWS KMS) key used to encrypt the canary's AWS Lambda function environment variables at rest. If you don't specify a value, the service uses an AWS-managed key.</p>"""
    dry_run_config: NotRequired[
        "capo_synthetics.types.dry_run_config_output.DryRunConfigOutput"
    ]
    """<p>Returns the dry run configurations for a canary.</p>"""

artifact_config instance-attribute

artifact_config: NotRequired[ArtifactConfigOutput]

A structure that contains the configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3.

artifact_s3_location instance-attribute

artifact_s3_location: NotRequired[String]

The location in Amazon S3 where Synthetics stores artifacts from the runs of this canary. Artifacts include the log file, screenshots, and HAR files.

browser_configs instance-attribute

browser_configs: NotRequired[BrowserConfigs]

A structure that specifies the browser type to use for a canary run. CloudWatch Synthetics supports running canaries on both CHROME and FIREFOX browsers.

If not specified, browserConfigs defaults to Chrome.

code instance-attribute

code: NotRequired[CanaryCodeOutput]

dry_run_config instance-attribute

dry_run_config: NotRequired[DryRunConfigOutput]

Returns the dry run configurations for a canary.

engine_arn instance-attribute

engine_arn: NotRequired[FunctionArn]

The ARN of the Lambda function that is used as your canary's engine. For more information about Lambda ARN format, see Resources and Conditions for Lambda Actions.

engine_configs instance-attribute

engine_configs: NotRequired[EngineConfigs]

A list of engine configurations for the canary, one for each browser type that the canary is configured to run on.

All runtime versions syn-nodejs-puppeteer-11.0 and above, and syn-nodejs-playwright-3.0 and above, use engineConfigs only. You can no longer use engineArn in these versions.

Runtime versions older than syn-nodejs-puppeteer-11.0 and syn-nodejs-playwright-3.0 continue to support engineArn to ensure backward compatibility.

execution_role_arn instance-attribute

execution_role_arn: NotRequired[RoleArn]

The ARN of the IAM role used to run the canary. This role must include lambda.amazonaws.com as a principal in the trust policy.

failure_retention_period_in_days instance-attribute

failure_retention_period_in_days: NotRequired[MaxSize1024]

The number of days to retain data about failed runs of this canary.

This setting affects the range of information returned by GetCanaryRuns, as well as the range of information displayed in the Synthetics console.

id instance-attribute

id: NotRequired[UUID]

The unique ID of this canary.

kms_key_arn instance-attribute

kms_key_arn: NotRequired[KmsKeyArn]

The Amazon Resource Name (ARN) of the customer-managed AWS Key Management Service (AWS KMS) key used to encrypt the canary's AWS Lambda function environment variables at rest. If you don't specify a value, the service uses an AWS-managed key.

multi_location_config instance-attribute

multi_location_config: NotRequired[MultiLocationConfig]

If this canary is part of a multi-location configuration, this structure contains information about the canary's location type, primary location, and replicas.

name instance-attribute

name: NotRequired[CanaryName]

The name of the canary.

provisioned_resource_cleanup instance-attribute

provisioned_resource_cleanup: NotRequired[ProvisionedResourceCleanupSetting]

Specifies whether to also delete the Lambda functions and layers used by this canary when the canary is deleted. If it is AUTOMATIC, the Lambda functions and layers will be deleted when the canary is deleted.

If the value of this parameter is OFF, then the value of the DeleteLambda parameter of the DeleteCanary operation determines whether the Lambda functions and layers will be deleted.

run_config instance-attribute

run_config: NotRequired[CanaryRunConfigOutput]

runtime_version instance-attribute

runtime_version: NotRequired[String]

Specifies the runtime version to use for the canary. For more information about runtime versions, see Canary Runtime Versions.

schedule instance-attribute

schedule: NotRequired[CanaryScheduleOutput]

A structure that contains information about how often the canary is to run, and when these runs are to stop.

status instance-attribute

status: NotRequired[CanaryStatus]

A structure that contains information about the canary's status.

success_retention_period_in_days instance-attribute

success_retention_period_in_days: NotRequired[MaxSize1024]

The number of days to retain data about successful runs of this canary.

This setting affects the range of information returned by GetCanaryRuns, as well as the range of information displayed in the Synthetics console.

tags instance-attribute

tags: NotRequired[TagMap]

The list of key-value pairs that are associated with the canary.

timeline instance-attribute

timeline: NotRequired[CanaryTimeline]

A structure that contains information about when the canary was created, modified, and most recently run.

visual_reference instance-attribute

visual_reference: NotRequired[VisualReferenceOutput]

If this canary performs visual monitoring by comparing screenshots, this structure contains the ID of the canary run to use as the baseline for screenshots, and the coordinates of any parts of the screen to ignore during the visual monitoring comparison.

visual_references instance-attribute

visual_references: NotRequired[VisualReferencesOutput]

A list of visual reference configurations for the canary, one for each browser type that the canary is configured to run on. Visual references are used for visual monitoring comparisons.

syn-nodejs-puppeteer-11.0 and above, and syn-nodejs-playwright-3.0 and above, only supports visualReferences. visualReference field is not supported.

Versions older than syn-nodejs-puppeteer-11.0 supports both visualReference and visualReferences for backward compatibility. It is recommended to use visualReferences for consistency and future compatibility.

vpc_config instance-attribute

vpc_config: NotRequired[VpcConfigOutput]