CustomTestOptions
- class aws_cdk.aws_synthetics.CustomTestOptions(*, code, handler)
Bases:
object
Properties for specifying a test.
- Parameters:
code (
Code
) – The code of the canary script.handler (
str
) – The handler for the code. Must end with.handler
.
- ExampleMetadata:
infused
Example:
import aws_cdk as cdk canary = synthetics.Canary(self, "MyCanary", schedule=synthetics.Schedule.rate(Duration.minutes(5)), test=synthetics.Test.custom( code=synthetics.Code.from_asset(path.join(__dirname, "canary")), handler="index.handler" ), runtime=synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_6_2, memory=cdk.Size.mebibytes(1024) )
Attributes
- code
The code of the canary script.
- handler
The handler for the code.
Must end with
.handler
.