Class: AWSCDK::Synthetics::InlineCode

Inherits:
Code
  • Object
show all
Defined in:
synthetics/inline_code.rb

Overview

Canary code from an inline string.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code) ⇒ InlineCode

Returns a new instance of InlineCode.

Parameters:

  • code (String)


9
10
11
12
# File 'synthetics/inline_code.rb', line 9

def initialize(code)
  Jsii::Type.check_type(code, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "code")
  Jsii::Object.instance_method(:initialize).bind(self).call(code)
end

Class Method Details

.jsii_overridable_methodsObject



14
15
16
17
18
# File 'synthetics/inline_code.rb', line 14

def self.jsii_overridable_methods
  {
    :bind => { kind: :method, name: "bind", is_optional: false },
  }
end

Instance Method Details

#bind(scope, handler, _family, _runtime_name = nil) ⇒ AWSCDK::Synthetics::CodeConfig

Called when the canary is initialized to allow this object to bind to the stack, add resources and have fun.

Parameters:

Returns:



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

def bind(scope, handler, _family, _runtime_name = nil)
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  Jsii::Type.check_type(handler, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "handler")
  Jsii::Type.check_type(_family, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3ludGhldGljcy5SdW50aW1lRmFtaWx5In0=")), "_family")
  Jsii::Type.check_type(_runtime_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "_runtimeName") unless _runtime_name.nil?
  jsii_call_method("bind", [scope, handler, _family, _runtime_name])
end