@aws-cdk_aws-synthetics-alpha.CustomTestOptions

interface CustomTestOptions ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Synthetics.Alpha.CustomTestOptions
Gogithub.com/aws/aws-cdk-go/awscdksyntheticsalpha/v2#CustomTestOptions
Javasoftware.amazon.awscdk.services.synthetics.alpha.CustomTestOptions
Pythonaws_cdk.aws_synthetics_alpha.CustomTestOptions
TypeScript (source)@aws-cdk/aws-synthetics-alpha ยป CustomTestOptions

Properties for specifying a test.

Example

const canary = new synthetics.Canary(this, 'MyCanary', {
  schedule: synthetics.Schedule.rate(Duration.minutes(5)),
  test: synthetics.Test.custom({
    code: synthetics.Code.fromAsset(path.join(__dirname, 'canary')),
    handler: 'index.handler',
  }),
  runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_4_0,
  environmentVariables: {
    stage: 'prod',
  },
});

Properties

NameTypeDescription
code๐Ÿ”นCodeThe code of the canary script.
handler๐Ÿ”นstringThe handler for the code.

code๐Ÿ”น

Type: Code

The code of the canary script.


handler๐Ÿ”น

Type: string

The handler for the code.

Must end with .handler.