Class: AWSCDK::Synthetics::S3Code

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

Overview

S3 bucket path to the code zip file.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bucket, key, object_version = nil) ⇒ S3Code

Returns a new instance of S3Code.

Parameters:



11
12
13
14
15
16
# File 'synthetics/s3_code.rb', line 11

def initialize(bucket, key, object_version = nil)
  Jsii::Type.check_type(bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19zMy5JQnVja2V0UmVmIn0=")), "bucket")
  Jsii::Type.check_type(key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key")
  Jsii::Type.check_type(object_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "objectVersion") unless object_version.nil?
  Jsii::Object.instance_method(:initialize).bind(self).call(bucket, key, object_version)
end

Class Method Details

.jsii_overridable_methodsObject



18
19
20
21
22
# File 'synthetics/s3_code.rb', line 18

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:



31
32
33
34
35
36
37
# File 'synthetics/s3_code.rb', line 31

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