Class: AWSCDK::Synthetics::CodeConfig
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Synthetics::CodeConfig
- Defined in:
- synthetics/code_config.rb
Overview
Configuration of the code class.
Instance Attribute Summary collapse
-
#inline_code ⇒ String?
readonly
Inline code (mutually exclusive with
s3Location). -
#s3_location ⇒ AWSCDK::S3::Location?
readonly
The location of the code in S3 (mutually exclusive with
inlineCode).
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(inline_code: nil, s3_location: nil) ⇒ CodeConfig
constructor
A new instance of CodeConfig.
- #to_jsii ⇒ Object
Constructor Details
#initialize(inline_code: nil, s3_location: nil) ⇒ CodeConfig
Returns a new instance of CodeConfig.
9 10 11 12 13 14 |
# File 'synthetics/code_config.rb', line 9 def initialize(inline_code: nil, s3_location: nil) @inline_code = inline_code Jsii::Type.check_type(@inline_code, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "inlineCode") unless @inline_code.nil? @s3_location = s3_location.is_a?(Hash) ? ::AWSCDK::S3::Location.new(**s3_location.transform_keys(&:to_sym)) : s3_location Jsii::Type.check_type(@s3_location, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuTG9jYXRpb24ifQ==")), "s3Location") unless @s3_location.nil? end |
Instance Attribute Details
#inline_code ⇒ String? (readonly)
Note:
Default: - none
Inline code (mutually exclusive with s3Location).
20 21 22 |
# File 'synthetics/code_config.rb', line 20 def inline_code @inline_code end |
#s3_location ⇒ AWSCDK::S3::Location? (readonly)
Note:
Default: - none
The location of the code in S3 (mutually exclusive with inlineCode).
25 26 27 |
# File 'synthetics/code_config.rb', line 25 def s3_location @s3_location end |
Class Method Details
.jsii_properties ⇒ Object
27 28 29 30 31 32 |
# File 'synthetics/code_config.rb', line 27 def self.jsii_properties { :inline_code => "inlineCode", :s3_location => "s3Location", } end |
Instance Method Details
#to_jsii ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'synthetics/code_config.rb', line 34 def to_jsii result = {} result.merge!({ "inlineCode" => @inline_code, "s3Location" => @s3_location, }) result.compact end |