Class: AWSCDK::CloudFront::CfnFunctionProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudFront::CfnFunctionProps
- Defined in:
- cloud_front/cfn_function_props.rb
Overview
Properties for defining a CfnFunction.
Instance Attribute Summary collapse
-
#auto_publish ⇒ Boolean, ...
readonly
A flag that determines whether to automatically publish the function to the
LIVEstage when it’s created. -
#function_code ⇒ String
readonly
The function code.
-
#function_config ⇒ AWSCDK::IResolvable, AWSCDK::CloudFront::CfnFunction::FunctionConfigProperty
readonly
Contains configuration information about a CloudFront function.
-
#function_metadata ⇒ AWSCDK::IResolvable, ...
readonly
Contains metadata about a CloudFront function.
-
#name ⇒ String
readonly
A name to identify the function.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
A complex type that contains zero or more
Tagelements.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(function_code:, function_config:, name:, auto_publish: nil, function_metadata: nil, tags: nil) ⇒ CfnFunctionProps
constructor
A new instance of CfnFunctionProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(function_code:, function_config:, name:, auto_publish: nil, function_metadata: nil, tags: nil) ⇒ CfnFunctionProps
Returns a new instance of CfnFunctionProps.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'cloud_front/cfn_function_props.rb', line 15 def initialize(function_code:, function_config:, name:, auto_publish: nil, function_metadata: nil, tags: nil) @function_code = function_code Jsii::Type.check_type(@function_code, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "functionCode") @function_config = function_config.is_a?(Hash) ? ::AWSCDK::CloudFront::CfnFunction::FunctionConfigProperty.new(**function_config.transform_keys(&:to_sym)) : function_config Jsii::Type.check_type(@function_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZGZyb250LkNmbkZ1bmN0aW9uLkZ1bmN0aW9uQ29uZmlnUHJvcGVydHkifV19fQ==")), "functionConfig") @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") @auto_publish = auto_publish Jsii::Type.check_type(@auto_publish, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "autoPublish") unless @auto_publish.nil? @function_metadata = .is_a?(Hash) ? ::AWSCDK::CloudFront::CfnFunction::FunctionMetadataProperty.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@function_metadata, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZGZyb250LkNmbkZ1bmN0aW9uLkZ1bmN0aW9uTWV0YWRhdGFQcm9wZXJ0eSJ9XX19")), "functionMetadata") unless @function_metadata.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#auto_publish ⇒ Boolean, ... (readonly)
A flag that determines whether to automatically publish the function to the LIVE stage when it’s created.
To automatically publish to the LIVE stage, set this property to true .
53 54 55 |
# File 'cloud_front/cfn_function_props.rb', line 53 def auto_publish @auto_publish end |
#function_code ⇒ String (readonly)
The function code.
For more information about writing a CloudFront function, see Writing function code for CloudFront Functions in the Amazon CloudFront Developer Guide .
36 37 38 |
# File 'cloud_front/cfn_function_props.rb', line 36 def function_code @function_code end |
#function_config ⇒ AWSCDK::IResolvable, AWSCDK::CloudFront::CfnFunction::FunctionConfigProperty (readonly)
Contains configuration information about a CloudFront function.
41 42 43 |
# File 'cloud_front/cfn_function_props.rb', line 41 def function_config @function_config end |
#function_metadata ⇒ AWSCDK::IResolvable, ... (readonly)
Contains metadata about a CloudFront function.
58 59 60 |
# File 'cloud_front/cfn_function_props.rb', line 58 def @function_metadata end |
#name ⇒ String (readonly)
A name to identify the function.
46 47 48 |
# File 'cloud_front/cfn_function_props.rb', line 46 def name @name end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
A complex type that contains zero or more Tag elements.
63 64 65 |
# File 'cloud_front/cfn_function_props.rb', line 63 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
65 66 67 68 69 70 71 72 73 74 |
# File 'cloud_front/cfn_function_props.rb', line 65 def self.jsii_properties { :function_code => "functionCode", :function_config => "functionConfig", :name => "name", :auto_publish => "autoPublish", :function_metadata => "functionMetadata", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'cloud_front/cfn_function_props.rb', line 76 def to_jsii result = {} result.merge!({ "functionCode" => @function_code, "functionConfig" => @function_config, "name" => @name, "autoPublish" => @auto_publish, "functionMetadata" => @function_metadata, "tags" => @tags, }) result.compact end |