Class: AWSCDK::Synthetics::Test
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::Synthetics::Test
- Defined in:
- synthetics/test.rb
Overview
Specify a test that the canary should run.
Class Method Summary collapse
-
.custom(options) ⇒ AWSCDK::Synthetics::Test
Specify a custom test with your own code.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#code ⇒ AWSCDK::Synthetics::Code
The code that the canary should run.
-
#handler ⇒ String
The handler of the canary.
-
#initialize(*args) ⇒ Test
constructor
A new instance of Test.
Constructor Details
#initialize(*args) ⇒ Test
Returns a new instance of Test.
8 9 10 |
# File 'synthetics/test.rb', line 8 def initialize(*args) raise NoMethodError, "aws-cdk-lib.aws_synthetics.Test does not have a visible constructor; use the provided factory methods" end |
Class Method Details
.custom(options) ⇒ AWSCDK::Synthetics::Test
Specify a custom test with your own code.
23 24 25 26 27 |
# File 'synthetics/test.rb', line 23 def self.custom() = .is_a?(Hash) ? ::AWSCDK::Synthetics::CustomTestOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3ludGhldGljcy5DdXN0b21UZXN0T3B0aW9ucyJ9")), "options") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_synthetics.Test", "custom", []) end |
.jsii_overridable_methods ⇒ Object
12 13 14 15 16 17 |
# File 'synthetics/test.rb', line 12 def self.jsii_overridable_methods { :code => { kind: :property, name: "code", is_optional: false }, :handler => { kind: :property, name: "handler", is_optional: false }, } end |
Instance Method Details
#code ⇒ AWSCDK::Synthetics::Code
The code that the canary should run.
32 33 34 |
# File 'synthetics/test.rb', line 32 def code() jsii_get_property("code") end |
#handler ⇒ String
The handler of the canary.
39 40 41 |
# File 'synthetics/test.rb', line 39 def handler() jsii_get_property("handler") end |