Class: AWSCDK::Synthetics::CustomTestOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
synthetics/custom_test_options.rb

Overview

Properties for specifying a test.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code:, handler:) ⇒ CustomTestOptions

Returns a new instance of CustomTestOptions.

Parameters:



9
10
11
12
13
14
# File 'synthetics/custom_test_options.rb', line 9

def initialize(code:, handler:)
  @code = code
  Jsii::Type.check_type(@code, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3ludGhldGljcy5Db2RlIn0=")), "code")
  @handler = handler
  Jsii::Type.check_type(@handler, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "handler")
end

Instance Attribute Details

#codeAWSCDK::Synthetics::Code (readonly)

The code of the canary script.



19
20
21
# File 'synthetics/custom_test_options.rb', line 19

def code
  @code
end

#handlerString (readonly)

The handler for the code.

Must end with .handler.

Returns:

  • (String)


25
26
27
# File 'synthetics/custom_test_options.rb', line 25

def handler
  @handler
end

Class Method Details

.jsii_propertiesObject



27
28
29
30
31
32
# File 'synthetics/custom_test_options.rb', line 27

def self.jsii_properties
  {
    :code => "code",
    :handler => "handler",
  }
end

Instance Method Details

#to_jsiiObject



34
35
36
37
38
39
40
41
# File 'synthetics/custom_test_options.rb', line 34

def to_jsii
  result = {}
  result.merge!({
    "code" => @code,
    "handler" => @handler,
  })
  result.compact
end