CustomTestOptions
- class aws_cdk.aws_synthetics.CustomTestOptions(*, code, handler)
Bases:
object
(experimental) Properties for specifying a test.
- Parameters:
code (
Code
) – (experimental) The code of the canary script.handler (
str
) – (experimental) The handler for the code. Must end with.handler
.
- Stability:
experimental
- ExampleMetadata:
infused
Example:
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_3_1, environment_variables={ "stage": "prod" } )
Attributes
- code
(experimental) The code of the canary script.
- Stability:
experimental
- handler
(experimental) The handler for the code.
Must end with
.handler
.- Stability:
experimental