Class: AWSCDK::CloudFront::CfnDistribution::LegacyS3OriginProperty

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

Overview

The origin as an Amazon S3 bucket.

This property is legacy. We recommend that you use Origin instead.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dns_name:, origin_access_identity: nil) ⇒ LegacyS3OriginProperty

Returns a new instance of LegacyS3OriginProperty.

Parameters:

  • dns_name (String)

    The domain name assigned to your CloudFront distribution.

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

    The CloudFront origin access identity to associate with the distribution.



2391
2392
2393
2394
2395
2396
# File 'cloud_front/cfn_distribution.rb', line 2391

def initialize(dns_name:, origin_access_identity: nil)
  @dns_name = dns_name
  Jsii::Type.check_type(@dns_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dnsName")
  @origin_access_identity = origin_access_identity
  Jsii::Type.check_type(@origin_access_identity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "originAccessIdentity") unless @origin_access_identity.nil?
end

Instance Attribute Details

#dns_nameString (readonly)

The domain name assigned to your CloudFront distribution.



2402
2403
2404
# File 'cloud_front/cfn_distribution.rb', line 2402

def dns_name
  @dns_name
end

#origin_access_identityString? (readonly)

Note:

Default: - ""

The CloudFront origin access identity to associate with the distribution.

Use an origin access identity to configure the distribution so that end users can only access objects in an Amazon S3 through CloudFront .

This property is legacy. We recommend that you use OriginAccessControl instead.



2412
2413
2414
# File 'cloud_front/cfn_distribution.rb', line 2412

def origin_access_identity
  @origin_access_identity
end

Class Method Details

.jsii_propertiesObject



2414
2415
2416
2417
2418
2419
# File 'cloud_front/cfn_distribution.rb', line 2414

def self.jsii_properties
  {
    :dns_name => "dnsName",
    :origin_access_identity => "originAccessIdentity",
  }
end

Instance Method Details

#to_jsiiObject



2421
2422
2423
2424
2425
2426
2427
2428
# File 'cloud_front/cfn_distribution.rb', line 2421

def to_jsii
  result = {}
  result.merge!({
    "dnsName" => @dns_name,
    "originAccessIdentity" => @origin_access_identity,
  })
  result.compact
end