{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-cloudwatch/json-schema/amazon-cloudwatch-get-canary-response-schema.json",
  "title": "GetCanaryResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-cloudwatch-canary-api-openapi.yml#/components/schemas/GetCanaryResponse",
  "type": "object",
  "properties": {
    "Canary": {
      "$ref": "#/$defs/Canary"
    }
  },
  "$defs": {
    "ArtifactConfigOutput": {
      "type": "object",
      "properties": {
        "S3Encryption": {
          "$ref": "#/$defs/S3EncryptionConfig"
        }
      }
    },
    "BaseScreenshot": {
      "type": "object",
      "properties": {
        "ScreenshotName": {
          "type": "string",
          "description": "The name of the screenshot. This is generated the first time the canary is run after the UpdateCanary operation that specified for this canary to perform visual monitoring."
        },
        "IgnoreCoordinates": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Coordinates that define the part of a screen to ignore during screenshot comparisons. To obtain the coordinates to use here, use the CloudWatch console to draw the boundaries on the screen. For more information, see Editing or deleting a canary"
        }
      },
      "required": [
        "ScreenshotName"
      ]
    },
    "BrowserConfig": {
      "type": "object",
      "properties": {
        "BrowserType": {
          "type": "string",
          "enum": [
            "CHROME",
            "FIREFOX"
          ],
          "description": "The browser type associated with this browser configuration."
        }
      }
    },
    "Canary": {
      "type": "object",
      "properties": {
        "Id": {
          "type": "string",
          "description": "The unique ID of this canary."
        },
        "Name": {
          "type": "string",
          "description": "The name of the canary."
        },
        "Code": {
          "$ref": "#/$defs/CanaryCodeOutput"
        },
        "ExecutionRoleArn": {
          "type": "string",
          "description": "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."
        },
        "Schedule": {
          "$ref": "#/$defs/CanaryScheduleOutput"
        },
        "RunConfig": {
          "$ref": "#/$defs/CanaryRunConfigOutput"
        },
        "SuccessRetentionPeriodInDays": {
          "type": "integer",
          "description": "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."
        },
        "FailureRetentionPeriodInDays": {
          "type": "integer",
          "description": "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."
        },
        "Status": {
          "$ref": "#/$defs/CanaryStatus"
        },
        "Timeline": {
          "$ref": "#/$defs/CanaryTimeline"
        },
        "ArtifactS3Location": {
          "type": "string",
          "description": "The location in Amazon S3 where Synthetics stores artifacts from the runs of this canary. Artifacts include the log file, screenshots, and HAR files."
        },
        "EngineArn": {
          "type": "string",
          "description": "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."
        },
        "RuntimeVersion": {
          "type": "string",
          "description": "Specifies the runtime version to use for the canary. For more information about runtime versions, see Canary Runtime Versions."
        },
        "VpcConfig": {
          "$ref": "#/$defs/VpcConfigOutput"
        },
        "VisualReference": {
          "$ref": "#/$defs/VisualReferenceOutput"
        },
        "ProvisionedResourceCleanup": {
          "type": "string",
          "enum": [
            "AUTOMATIC",
            "OFF"
          ],
          "description": "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."
        },
        "BrowserConfigs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BrowserConfig"
          },
          "description": "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."
        },
        "EngineConfigs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EngineConfig"
          },
          "description": "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."
        },
        "VisualReferences": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/VisualReferenceOutput"
          },
          "description": "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."
        },
        "MultiLocationConfig": {
          "$ref": "#/$defs/MultiLocationConfig"
        },
        "Tags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The list of key-value pairs that are associated with the canary."
        },
        "ArtifactConfig": {
          "$ref": "#/$defs/ArtifactConfigOutput"
        },
        "KmsKeyArn": {
          "type": "string",
          "description": "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."
        },
        "DryRunConfig": {
          "$ref": "#/$defs/DryRunConfigOutput"
        }
      }
    },
    "CanaryCodeOutput": {
      "type": "object",
      "properties": {
        "SourceLocationArn": {
          "type": "string",
          "description": "The ARN of the Lambda layer where Synthetics stores the canary script code."
        },
        "Handler": {
          "type": "string",
          "description": "The entry point to use for the source code when running the canary. This field is required when you don't specify BlueprintTypes and is not allowed when you specify BlueprintTypes."
        },
        "BlueprintTypes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "BlueprintTypes is a list of templates that enable simplified canary creation. You can create canaries for common monitoring scenarios by providing only a JSON configuration file instead of writing custom scripts. The only supported value is multi-checks. Multi-checks monitors HTTP/DNS/SSL/TCP endpoints with built-in authentication schemes (Basic, API Key, OAuth, SigV4) and assertion capabilities. When you specify BlueprintTypes, the Handler field cannot be specified since the blueprint provides a pre-defined entry point. BlueprintTypes is supported only on canaries for syn-nodejs-3.0 runtime o"
        },
        "Dependencies": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Dependency"
          },
          "description": "A list of dependencies that are used for running this canary. The dependencies are specified as a key-value pair, where the key is the type of dependency and the value is the dependency reference."
        }
      }
    },
    "CanaryRunConfigOutput": {
      "type": "object",
      "properties": {
        "TimeoutInSeconds": {
          "type": "integer",
          "description": "How long the canary is allowed to run before it must stop."
        },
        "MemoryInMB": {
          "type": "integer",
          "description": "The maximum amount of memory available to the canary while it is running, in MB. This value must be a multiple of 64."
        },
        "ActiveTracing": {
          "type": "boolean",
          "description": "Displays whether this canary run used active X-Ray tracing."
        },
        "EphemeralStorage": {
          "type": "integer",
          "description": "Specifies the amount of ephemeral storage (in MB) to allocate for the canary run during execution. This temporary storage is used for storing canary run artifacts (which are uploaded to an Amazon S3 bucket at the end of the run), and any canary browser operations. This temporary storage is cleared after the run is completed. Default storage value is 1024 MB."
        }
      }
    },
    "CanaryScheduleOutput": {
      "type": "object",
      "properties": {
        "Expression": {
          "type": "string",
          "description": "A rate expression or a cron expression that defines how often the canary is to run. For a rate expression, The syntax is rate(number unit). unit can be minute, minutes, or hour. For example, rate(1 minute) runs the canary once a minute, rate(10 minutes) runs it once every 10 minutes, and rate(1 hour) runs it once every hour. You can specify a frequency between rate(1 minute) and rate(1 hour). Specifying rate(0 minute) or rate(0 hour) is a special value that causes the canary to run only once when it is started. Use cron(expression) to specify a cron expression. For information about the syntax"
        },
        "DurationInSeconds": {
          "type": "integer",
          "description": "How long, in seconds, for the canary to continue making regular runs after it was created. The runs are performed according to the schedule in the Expression value."
        },
        "RetryConfig": {
          "$ref": "#/$defs/RetryConfigOutput"
        }
      }
    },
    "CanaryStatus": {
      "type": "object",
      "properties": {
        "State": {
          "type": "string",
          "enum": [
            "CREATING",
            "READY",
            "STARTING",
            "RUNNING",
            "UPDATING",
            "STOPPING",
            "STOPPED",
            "ERROR",
            "DELETING"
          ],
          "description": "The current state of the canary."
        },
        "StateReason": {
          "type": "string",
          "description": "If the canary creation or update failed, this field provides details on the failure."
        },
        "StateReasonCode": {
          "type": "string",
          "enum": [
            "INVALID_PERMISSIONS",
            "CREATE_PENDING",
            "CREATE_IN_PROGRESS",
            "CREATE_FAILED",
            "UPDATE_PENDING",
            "UPDATE_IN_PROGRESS",
            "UPDATE_COMPLETE",
            "ROLLBACK_COMPLETE",
            "ROLLBACK_FAILED",
            "DELETE_IN_PROGRESS",
            "DELETE_FAILED",
            "SYNC_DELETE_IN_PROGRESS"
          ],
          "description": "If the canary creation or update failed, this field displays the reason code."
        }
      }
    },
    "CanaryTimeline": {
      "type": "object",
      "properties": {
        "Created": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time the canary was created."
        },
        "LastModified": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time the canary was most recently modified."
        },
        "LastStarted": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time that the canary's most recent run started."
        },
        "LastStopped": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time that the canary's most recent run ended."
        }
      }
    },
    "Dependency": {
      "type": "object",
      "properties": {
        "Type": {
          "type": "string",
          "enum": [
            "LambdaLayer"
          ],
          "description": "The type of dependency. Valid value is LambdaLayer."
        },
        "Reference": {
          "type": "string",
          "description": "The dependency reference. For Lambda layers, this is the ARN of the Lambda layer. For more information about Lambda ARN format, see Lambda."
        }
      },
      "required": [
        "Reference"
      ]
    },
    "DryRunConfigOutput": {
      "type": "object",
      "properties": {
        "DryRunId": {
          "type": "string",
          "description": "The DryRunId associated with an existing canary’s dry run. You can use this DryRunId to retrieve information about the dry run."
        },
        "LastDryRunExecutionStatus": {
          "type": "string",
          "description": "Returns the last execution status for a canary's dry run."
        }
      }
    },
    "EngineConfig": {
      "type": "object",
      "properties": {
        "EngineArn": {
          "type": "string",
          "description": "Each engine configuration contains the ARN of the Lambda function that is used as the canary's engine for a specific browser type."
        },
        "BrowserType": {
          "type": "string",
          "enum": [
            "CHROME",
            "FIREFOX"
          ],
          "description": "The browser type associated with this engine configuration."
        }
      }
    },
    "MultiLocationConfig": {
      "type": "object",
      "properties": {
        "LocationType": {
          "type": "string",
          "enum": [
            "Primary",
            "Replica"
          ],
          "description": "Indicates whether this canary is the Primary or a Replica in the multi-location configuration."
        },
        "PrimaryLocation": {
          "type": "string",
          "description": "The Amazon Web Services Region where the primary canary is located."
        },
        "Replicas": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Replica"
          },
          "description": "A list of replicas for this canary. This field is present only for the primary location canary."
        },
        "ReplicationState": {
          "type": "string",
          "enum": [
            "InProgress",
            "InSync",
            "Inconsistent"
          ],
          "description": "The overall replication state of the canary across all replica locations. This field is present only for the primary location canary. Valid values are InProgress, InSync, and Inconsistent."
        }
      }
    },
    "Replica": {
      "type": "object",
      "properties": {
        "Location": {
          "type": "string",
          "description": "The Amazon Web Services Region where this replica is located."
        },
        "ReplicationStatus": {
          "$ref": "#/$defs/ReplicationStatus"
        },
        "CanaryState": {
          "type": "string",
          "enum": [
            "CREATING",
            "READY",
            "STARTING",
            "RUNNING",
            "UPDATING",
            "STOPPING",
            "STOPPED",
            "ERROR",
            "DELETING"
          ],
          "description": "The current state of the canary in this replica location."
        },
        "LastModified": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time that the replica was last modified."
        },
        "VpcConfig": {
          "$ref": "#/$defs/VpcConfigOutput"
        }
      }
    },
    "ReplicationStatus": {
      "type": "object",
      "properties": {
        "State": {
          "type": "string",
          "enum": [
            "InProgress",
            "InSync",
            "Inconsistent"
          ],
          "description": "The replication state of the replica. Valid values are InProgress, InSync, and Inconsistent."
        },
        "StateReason": {
          "type": "string",
          "description": "A description that provides more detail about the current replication state."
        },
        "StateReasonCode": {
          "type": "string",
          "description": "A code that provides more detail about the current replication state."
        }
      }
    },
    "RetryConfigOutput": {
      "type": "object",
      "properties": {
        "MaxRetries": {
          "type": "integer",
          "description": "The maximum number of retries. The value must be less than or equal to 2."
        }
      }
    },
    "S3EncryptionConfig": {
      "type": "object",
      "properties": {
        "EncryptionMode": {
          "type": "string",
          "enum": [
            "SSE_S3",
            "SSE_KMS"
          ],
          "description": "The encryption method to use for artifacts created by this canary. Specify SSE_S3 to use server-side encryption (SSE) with an Amazon S3-managed key. Specify SSE-KMS to use server-side encryption with a customer-managed KMS key. If you omit this parameter, an Amazon Web Services-managed KMS key is used."
        },
        "KmsKeyArn": {
          "type": "string",
          "description": "The ARN of the customer-managed KMS key to use, if you specify SSE-KMS for EncryptionMode"
        }
      }
    },
    "VisualReferenceOutput": {
      "type": "object",
      "properties": {
        "BaseScreenshots": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BaseScreenshot"
          },
          "description": "An array of screenshots that are used as the baseline for comparisons during visual monitoring."
        },
        "BaseCanaryRunId": {
          "type": "string",
          "description": "The ID of the canary run that produced the baseline screenshots that are used for visual monitoring comparisons by this canary."
        },
        "BrowserType": {
          "type": "string",
          "enum": [
            "CHROME",
            "FIREFOX"
          ],
          "description": "The browser type associated with this visual reference."
        }
      }
    },
    "VpcConfigOutput": {
      "type": "object",
      "properties": {
        "VpcId": {
          "type": "string",
          "description": "The IDs of the VPC where this canary is to run."
        },
        "SubnetIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The IDs of the subnets where this canary is to run."
        },
        "SecurityGroupIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The IDs of the security groups for this canary."
        },
        "Ipv6AllowedForDualStack": {
          "type": "boolean",
          "description": "Indicates whether this canary allows outbound IPv6 traffic if it is connected to dual-stack subnets."
        }
      }
    }
  }
}