@aws-cdk_aws-synthetics-alpha.Test

class Test ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Synthetics.Alpha.Test
Gogithub.com/aws/aws-cdk-go/awscdksyntheticsalpha/v2#Test
Javasoftware.amazon.awscdk.services.synthetics.alpha.Test
Pythonaws_cdk.aws_synthetics_alpha.Test
TypeScript (source)@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

NameTypeDescription
code๐Ÿ”นCodeThe code that the canary should run.
handler๐Ÿ”นstringThe handler of the canary.

code๐Ÿ”น

Type: Code

The code that the canary should run.


handler๐Ÿ”น

Type: string

The handler of the canary.

Methods

NameDescription
static custom(options)๐Ÿ”นSpecify a custom test with your own code.

static custom(options)๐Ÿ”น

public static custom(options: CustomTestOptions): Test

Parameters

  • options CustomTestOptions โ€” The configuration options.

Returns

  • Test

Specify a custom test with your own code.