Class: AWSCDK::CloudFront::FunctionCode
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::CloudFront::FunctionCode
- Defined in:
- cloud_front/function_code.rb
Overview
Represents the function's source code.
Class Method Summary collapse
-
.from_file(options) ⇒ AWSCDK::CloudFront::FunctionCode
Code from external file for function.
-
.from_inline(code) ⇒ AWSCDK::CloudFront::FunctionCode
Inline code for function.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#initialize ⇒ FunctionCode
constructor
A new instance of FunctionCode.
-
#render ⇒ String
renders the function code.
Constructor Details
#initialize ⇒ FunctionCode
Returns a new instance of FunctionCode.
8 9 10 |
# File 'cloud_front/function_code.rb', line 8 def initialize Jsii::Object.instance_method(:initialize).bind(self).call end |
Class Method Details
.from_file(options) ⇒ AWSCDK::CloudFront::FunctionCode
Code from external file for function.
22 23 24 25 26 |
# File 'cloud_front/function_code.rb', line 22 def self.from_file() = .is_a?(Hash) ? ::AWSCDK::CloudFront::FileCodeOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWRmcm9udC5GaWxlQ29kZU9wdGlvbnMifQ==")), "options") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudfront.FunctionCode", "fromFile", []) end |
.from_inline(code) ⇒ AWSCDK::CloudFront::FunctionCode
Inline code for function.
32 33 34 35 |
# File 'cloud_front/function_code.rb', line 32 def self.from_inline(code) Jsii::Type.check_type(code, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "code") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudfront.FunctionCode", "fromInline", [code]) end |
.jsii_overridable_methods ⇒ Object
12 13 14 15 16 |
# File 'cloud_front/function_code.rb', line 12 def self.jsii_overridable_methods { :render => { kind: :method, name: "render", is_optional: false }, } end |
Instance Method Details
#render ⇒ String
renders the function code.
40 41 42 |
# File 'cloud_front/function_code.rb', line 40 def render() jsii_call_method("render", []) end |