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.84.0 (build 5404dcf)", date="2023-06-19T16:30:40.476Z") @Stability(Experimental) public class Test extends software.amazon.jsii.JsiiObject
(experimental) 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_3_1)
         .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
    (experimental) Specify a custom test with your own code.
    (experimental) The code that the canary should run.
    (experimental) 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(Experimental) @NotNull public static Test custom(@NotNull CustomTestOptions options)
      (experimental) 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(Experimental) @NotNull public Code getCode()
      (experimental) The code that the canary should run.
    • getHandler

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