java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.synthetics.Test
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-02T15:58:34.362Z") @Stability(Stable) public class Test extends software.amazon.jsii.JsiiObject
Specify a test that the canary should run.

Example:

 Canary canary = Canary.Builder.create(this, "MyCanary")
         .schedule(Schedule.rate(Duration.minutes(5)))
         .test(Test.custom(CustomTestOptions.builder()
                 .code(Code.fromAsset(join(__dirname, "canary")))
                 .handler("index.handler")
                 .build()))
         .runtime(Runtime.SYNTHETICS_NODEJS_PUPPETEER_6_2)
         .environmentVariables(Map.of(
                 "stage", "prod"))
         .build();
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Test(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    Test(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Test
    Specify a custom test with your own code.
    The code that the canary should run.
    The handler of the canary.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • Test

      protected Test(software.amazon.jsii.JsiiObjectRef objRef)
    • Test

      protected Test(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
  • Method Details

    • custom

      @Stability(Stable) @NotNull public static Test custom(@NotNull CustomTestOptions options)
      Specify a custom test with your own code.

      Parameters:
      options - The configuration options. This parameter is required.
      Returns:
      Test associated with the specified Code object
    • getCode

      @Stability(Stable) @NotNull public Code getCode()
      The code that the canary should run.
    • getHandler

      @Stability(Stable) @NotNull public String getHandler()
      The handler of the canary.