Class: AWSCDK::CloudFront::OriginBindOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_front/origin_bind_options.rb

Overview

Options passed to Origin.bind().

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(origin_id:, distribution_id: nil) ⇒ OriginBindOptions

Returns a new instance of OriginBindOptions.

Parameters:

  • origin_id (String)

    The identifier of this Origin, as assigned by the Distribution this Origin has been used added to.

  • distribution_id (String, nil) (defaults to: nil)

    The identifier of the Distribution this Origin is used for.



9
10
11
12
13
14
# File 'cloud_front/origin_bind_options.rb', line 9

def initialize(origin_id:, distribution_id: nil)
  @origin_id = origin_id
  Jsii::Type.check_type(@origin_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "originId")
  @distribution_id = distribution_id
  Jsii::Type.check_type(@distribution_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "distributionId") unless @distribution_id.nil?
end

Instance Attribute Details

#distribution_idString? (readonly)

Note:

Default: - no distribution id

The identifier of the Distribution this Origin is used for.

This is used to grant origin access permissions to the distribution for origin access control.

Returns:

  • (String, nil)


26
27
28
# File 'cloud_front/origin_bind_options.rb', line 26

def distribution_id
  @distribution_id
end

#origin_idString (readonly)

The identifier of this Origin, as assigned by the Distribution this Origin has been used added to.

Returns:

  • (String)


19
20
21
# File 'cloud_front/origin_bind_options.rb', line 19

def origin_id
  @origin_id
end

Class Method Details

.jsii_propertiesObject



28
29
30
31
32
33
# File 'cloud_front/origin_bind_options.rb', line 28

def self.jsii_properties
  {
    :origin_id => "originId",
    :distribution_id => "distributionId",
  }
end

Instance Method Details

#to_jsiiObject



35
36
37
38
39
40
41
42
# File 'cloud_front/origin_bind_options.rb', line 35

def to_jsii
  result = {}
  result.merge!({
    "originId" => @origin_id,
    "distributionId" => @distribution_id,
  })
  result.compact
end