Class: AWSCDK::Synthetics::CustomTestOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Synthetics::CustomTestOptions
- Defined in:
- synthetics/custom_test_options.rb
Overview
Properties for specifying a test.
Instance Attribute Summary collapse
-
#code ⇒ AWSCDK::Synthetics::Code
readonly
The code of the canary script.
-
#handler ⇒ String
readonly
The handler for the code.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(code:, handler:) ⇒ CustomTestOptions
constructor
A new instance of CustomTestOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(code:, handler:) ⇒ CustomTestOptions
Returns a new instance of CustomTestOptions.
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
#code ⇒ AWSCDK::Synthetics::Code (readonly)
The code of the canary script.
19 20 21 |
# File 'synthetics/custom_test_options.rb', line 19 def code @code end |
#handler ⇒ String (readonly)
The handler for the code.
Must end with .handler.
25 26 27 |
# File 'synthetics/custom_test_options.rb', line 25 def handler @handler end |
Class Method Details
.jsii_properties ⇒ Object
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_jsii ⇒ Object
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 |