Class: AWSCDK::CloudFront::CfnStreamingDistribution::S3OriginProperty

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

Overview

A complex type that contains information about the Amazon S3 bucket from which you want CloudFront to get your media files for distribution.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(domain_name:, origin_access_identity:) ⇒ S3OriginProperty

Returns a new instance of S3OriginProperty.

Parameters:

  • domain_name (String)

    The DNS name of the Amazon S3 origin.

  • origin_access_identity (String)

    The CloudFront origin access identity to associate with the distribution.



590
591
592
593
594
595
# File 'cloud_front/cfn_streaming_distribution.rb', line 590

def initialize(domain_name:, origin_access_identity:)
  @domain_name = domain_name
  Jsii::Type.check_type(@domain_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "domainName")
  @origin_access_identity = origin_access_identity
  Jsii::Type.check_type(@origin_access_identity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "originAccessIdentity")
end

Instance Attribute Details

#domain_nameString (readonly)

The DNS name of the Amazon S3 origin.



601
602
603
# File 'cloud_front/cfn_streaming_distribution.rb', line 601

def domain_name
  @domain_name
end

#origin_access_identityString (readonly)

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 bucket through CloudFront.

If you want end users to be able to access objects using either the CloudFront URL or the Amazon S3 URL, specify an empty OriginAccessIdentity element.

To delete the origin access identity from an existing distribution, update the distribution configuration and include an empty OriginAccessIdentity element.

To replace the origin access identity, update the distribution configuration and specify the new origin access identity.

For more information, see Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content in the Amazon CloudFront Developer Guide .



616
617
618
# File 'cloud_front/cfn_streaming_distribution.rb', line 616

def origin_access_identity
  @origin_access_identity
end

Class Method Details

.jsii_propertiesObject



618
619
620
621
622
623
# File 'cloud_front/cfn_streaming_distribution.rb', line 618

def self.jsii_properties
  {
    :domain_name => "domainName",
    :origin_access_identity => "originAccessIdentity",
  }
end

Instance Method Details

#to_jsiiObject



625
626
627
628
629
630
631
632
# File 'cloud_front/cfn_streaming_distribution.rb', line 625

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