Class: AWSCDK::CloudFront::CfnDistribution::FunctionAssociationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudFront::CfnDistribution::FunctionAssociationProperty
- Defined in:
- cloud_front/cfn_distribution.rb
Overview
A CloudFront function that is associated with a cache behavior in a CloudFront distribution.
Instance Attribute Summary collapse
-
#event_type ⇒ String?
readonly
The event type of the function, either
viewer-requestorviewer-response. -
#function_arn ⇒ String?
readonly
The Amazon Resource Name (ARN) of the function.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(event_type: nil, function_arn: nil) ⇒ FunctionAssociationProperty
constructor
A new instance of FunctionAssociationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(event_type: nil, function_arn: nil) ⇒ FunctionAssociationProperty
Returns a new instance of FunctionAssociationProperty.
2103 2104 2105 2106 2107 2108 |
# File 'cloud_front/cfn_distribution.rb', line 2103 def initialize(event_type: nil, function_arn: nil) @event_type = event_type Jsii::Type.check_type(@event_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "eventType") unless @event_type.nil? @function_arn = function_arn Jsii::Type.check_type(@function_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "functionArn") unless @function_arn.nil? end |
Instance Attribute Details
#event_type ⇒ String? (readonly)
The event type of the function, either viewer-request or viewer-response .
You cannot use origin-facing event types ( origin-request and origin-response ) with a CloudFront function.
2116 2117 2118 |
# File 'cloud_front/cfn_distribution.rb', line 2116 def event_type @event_type end |
#function_arn ⇒ String? (readonly)
The Amazon Resource Name (ARN) of the function.
2121 2122 2123 |
# File 'cloud_front/cfn_distribution.rb', line 2121 def function_arn @function_arn end |
Class Method Details
.jsii_properties ⇒ Object
2123 2124 2125 2126 2127 2128 |
# File 'cloud_front/cfn_distribution.rb', line 2123 def self.jsii_properties { :event_type => "eventType", :function_arn => "functionArn", } end |
Instance Method Details
#to_jsii ⇒ Object
2130 2131 2132 2133 2134 2135 2136 2137 |
# File 'cloud_front/cfn_distribution.rb', line 2130 def to_jsii result = {} result.merge!({ "eventType" => @event_type, "functionArn" => @function_arn, }) result.compact end |