Class: AWSCDK::Synthetics::AssetCode
- Inherits:
-
Code
- Object
- Code
- AWSCDK::Synthetics::AssetCode
- Defined in:
- synthetics/asset_code.rb
Overview
Canary code from an Asset.
Class Method Summary collapse
Instance Method Summary collapse
-
#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.
-
#initialize(asset_path, options = nil) ⇒ AssetCode
constructor
A new instance of AssetCode.
Constructor Details
#initialize(asset_path, options = nil) ⇒ AssetCode
Returns a new instance of AssetCode.
10 11 12 13 14 15 |
# File 'synthetics/asset_code.rb', line 10 def initialize(asset_path, = nil) = .is_a?(Hash) ? ::AWSCDK::S3Assets::AssetOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(asset_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "assetPath") Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczNfYXNzZXRzLkFzc2V0T3B0aW9ucyJ9")), "options") unless .nil? Jsii::Object.instance_method(:initialize).bind(self).call(asset_path, ) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
17 18 19 20 21 |
# File 'synthetics/asset_code.rb', line 17 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.
30 31 32 33 34 35 36 |
# File 'synthetics/asset_code.rb', line 30 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 |