Class: AWSCDK::CloudFrontOrigins::OriginGroup

Inherits:
Jsii::Object
  • Object
show all
Includes:
AWSCDK::CloudFront::IOrigin
Defined in:
cloud_front_origins/origin_group.rb

Overview

An Origin that represents a group.

Consists of a primary Origin, and a fallback Origin called when the primary returns one of the provided HTTP status codes.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(props) ⇒ OriginGroup

Returns a new instance of OriginGroup.



13
14
15
16
17
# File 'cloud_front_origins/origin_group.rb', line 13

def initialize(props)
  props = props.is_a?(Hash) ? ::AWSCDK::CloudFrontOrigins::OriginGroupProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWRmcm9udF9vcmlnaW5zLk9yaWdpbkdyb3VwUHJvcHMifQ==")), "props")
  Jsii::Object.instance_method(:initialize).bind(self).call(props)
end

Class Method Details

.jsii_overridable_methodsObject



19
20
21
22
23
# File 'cloud_front_origins/origin_group.rb', line 19

def self.jsii_overridable_methods
  {
    :bind => { kind: :method, name: "bind", is_optional: false },
  }
end

Instance Method Details

#bind(scope, options) ⇒ AWSCDK::CloudFront::OriginBindConfig

The method called when a given Origin is added (for the first time) to a Distribution.

Parameters:

Returns:



30
31
32
33
34
35
# File 'cloud_front_origins/origin_group.rb', line 30

def bind(scope, options)
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  options = options.is_a?(Hash) ? ::AWSCDK::CloudFront::OriginBindOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWRmcm9udC5PcmlnaW5CaW5kT3B0aW9ucyJ9")), "options")
  jsii_call_method("bind", [scope, options])
end