import { ResourceBase , ResourceTag } from '../resource' ; import { Value , List } from '../dataTypes' ; export class VPCConfig { VpcId ? : Value < string > ; SubnetIds ! : List < Value < string > > ; SecurityGroupIds ! : List < Value < string > > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class Schedule { Expression ! : Value < string > ; DurationInSeconds ? : Value < string > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class Code { S3Bucket ? : Value < string > ; S3Key ? : Value < string > ; S3ObjectVersion ? : Value < string > ; Script ? : Value < string > ; Handler ! : Value < string > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class RunConfig { TimeoutInSeconds ? : Value < number > ; MemoryInMB ? : Value < number > ; ActiveTracing ? : Value < boolean > ; EnvironmentVariables ? : { [ key ] : Value < string > ; } ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export interface CanaryProperties { Name : Value < string > ; Code : Code ; ArtifactS3Location : Value < string > ; Schedule : Schedule ; ExecutionRoleArn : Value < string > ; RuntimeVersion : Value < string > ; SuccessRetentionPeriod ? : Value < number > ; FailureRetentionPeriod ? : Value < number > ; Tags ? : List < ResourceTag > ; VPCConfig ? : VPCConfig ; RunConfig ? : RunConfig ; StartCanaryAfterCreation : Value < boolean > ; } export default class Canary extends ResourceBase < CanaryProperties > { static VPCConfig = VPCConfig ; static Schedule = Schedule ; static Code = Code ; static RunConfig = RunConfig ; constructor ( properties ) { super ( 'AWS::Synthetics::Canary' , properties ) ; } }