Class: AWSCDK::CloudFront::CfnDistribution::OriginCustomHeaderProperty

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

Overview

A complex type that contains HeaderName and HeaderValue elements, if any, for this distribution.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(header_name:, header_value:) ⇒ OriginCustomHeaderProperty

Returns a new instance of OriginCustomHeaderProperty.

Parameters:

  • header_name (String)

    The name of a header that you want CloudFront to send to your origin.

  • header_value (String)

    The value for the header that you specified in the HeaderName field.



2500
2501
2502
2503
2504
2505
# File 'cloud_front/cfn_distribution.rb', line 2500

def initialize(header_name:, header_value:)
  @header_name = header_name
  Jsii::Type.check_type(@header_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "headerName")
  @header_value = header_value
  Jsii::Type.check_type(@header_value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "headerValue")
end

Instance Attribute Details

#header_nameString (readonly)

The name of a header that you want CloudFront to send to your origin.

For more information, see Adding Custom Headers to Origin Requests in the Amazon CloudFront Developer Guide .



2513
2514
2515
# File 'cloud_front/cfn_distribution.rb', line 2513

def header_name
  @header_name
end

#header_valueString (readonly)

The value for the header that you specified in the HeaderName field.



2518
2519
2520
# File 'cloud_front/cfn_distribution.rb', line 2518

def header_value
  @header_value
end

Class Method Details

.jsii_propertiesObject



2520
2521
2522
2523
2524
2525
# File 'cloud_front/cfn_distribution.rb', line 2520

def self.jsii_properties
  {
    :header_name => "headerName",
    :header_value => "headerValue",
  }
end

Instance Method Details

#to_jsiiObject



2527
2528
2529
2530
2531
2532
2533
2534
# File 'cloud_front/cfn_distribution.rb', line 2527

def to_jsii
  result = {}
  result.merge!({
    "headerName" => @header_name,
    "headerValue" => @header_value,
  })
  result.compact
end