@aws-cdk_aws-synthetics-alpha.Test
class Test
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Synthetics.Alpha.Test |
![]() | github.com/aws/aws-cdk-go/awscdksyntheticsalpha/v2#Test |
![]() | software.amazon.awscdk.services.synthetics.alpha.Test |
![]() | aws_cdk.aws_synthetics_alpha.Test |
![]() | @aws-cdk/aws-synthetics-alpha ยป Test |
Specify a test that the canary should run.
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
Name | Type | Description |
---|---|---|
code | Code | The code that the canary should run. |
handler | string | The handler of the canary. |
code
Type:
Code
The code that the canary should run.
handler
Type:
string
The handler of the canary.
Methods
Name | Description |
---|---|
static custom(options) | Specify a custom test with your own code. |
static custom(options)
public static custom(options: CustomTestOptions): Test
Parameters
- options
Custom
โ The configuration options.Test Options
Returns
Specify a custom test with your own code.