Class: AWSCDK::CloudFront::OriginBase

Inherits:
Jsii::Object
  • Object
show all
Includes:
IOrigin
Defined in:
cloud_front/origin_base.rb

Overview

Represents a distribution origin, that describes the Amazon S3 bucket, HTTP server (for example, a web server), Amazon MediaStore, or other server from which CloudFront gets your files.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(domain_name, props = nil) ⇒ OriginBase

Returns a new instance of OriginBase.

Parameters:



11
12
13
14
15
16
# File 'cloud_front/origin_base.rb', line 11

def initialize(domain_name, props = nil)
  props = props.is_a?(Hash) ? ::AWSCDK::CloudFront::OriginProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(domain_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "domainName")
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWRmcm9udC5PcmlnaW5Qcm9wcyJ9")), "props") unless props.nil?
  Jsii::Object.instance_method(:initialize).bind(self).call(domain_name, props)
end

Class Method Details

.jsii_overridable_methodsObject



18
19
20
21
22
23
24
25
26
# File 'cloud_front/origin_base.rb', line 18

def self.jsii_overridable_methods
  {
    :bind => { kind: :method, name: "bind", is_optional: false },
    :render_custom_origin_config => { kind: :method, name: "renderCustomOriginConfig", is_optional: false },
    :render_s3_origin_config => { kind: :method, name: "renderS3OriginConfig", is_optional: false },
    :render_vpc_origin_config => { kind: :method, name: "renderVpcOriginConfig", is_optional: false },
    :validate_response_completion_timeout_with_read_timeout => { kind: :method, name: "validateResponseCompletionTimeoutWithReadTimeout", is_optional: false },
  }
end

Instance Method Details

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

Binds the origin to the associated Distribution.

Can be used to grant permissions, create dependent resources, etc.

Parameters:

Returns:



35
36
37
38
39
40
# File 'cloud_front/origin_base.rb', line 35

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

#render_custom_origin_configAWSCDK::CloudFront::CfnDistribution::CustomOriginConfigProperty?



43
44
45
# File 'cloud_front/origin_base.rb', line 43

def render_custom_origin_config()
  jsii_call_method("renderCustomOriginConfig", [])
end

#render_s3_origin_configAWSCDK::CloudFront::CfnDistribution::S3OriginConfigProperty?



48
49
50
# File 'cloud_front/origin_base.rb', line 48

def render_s3_origin_config()
  jsii_call_method("renderS3OriginConfig", [])
end

#render_vpc_origin_configAWSCDK::CloudFront::CfnDistribution::VPCOriginConfigProperty?



53
54
55
# File 'cloud_front/origin_base.rb', line 53

def render_vpc_origin_config()
  jsii_call_method("renderVpcOriginConfig", [])
end

#validate_response_completion_timeout_with_read_timeout(response_completion_timeout = nil, read_timeout = nil) ⇒ void

This method returns an undefined value.

Validates that responseCompletionTimeout is greater than or equal to readTimeout when both are specified.

This method should be called by subclasses that support readTimeout.

Parameters:



64
65
66
67
68
# File 'cloud_front/origin_base.rb', line 64

def validate_response_completion_timeout_with_read_timeout(response_completion_timeout = nil, read_timeout = nil)
  Jsii::Type.check_type(response_completion_timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "responseCompletionTimeout") unless response_completion_timeout.nil?
  Jsii::Type.check_type(read_timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "readTimeout") unless read_timeout.nil?
  jsii_call_method("validateResponseCompletionTimeoutWithReadTimeout", [response_completion_timeout, read_timeout])
end