Class: AWSCDK::CloudFront::CfnDistributionTenant::GeoRestrictionCustomizationProperty

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

Overview

The customizations that you specified for the distribution tenant for geographic restrictions.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(locations: nil, restriction_type: nil) ⇒ GeoRestrictionCustomizationProperty

Returns a new instance of GeoRestrictionCustomizationProperty.

Parameters:

  • locations (Array<String>, nil) (defaults to: nil)

    The locations for geographic restrictions.

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

    The method that you want to use to restrict distribution of your content by country:.



801
802
803
804
805
806
# File 'cloud_front/cfn_distribution_tenant.rb', line 801

def initialize(locations: nil, restriction_type: nil)
  @locations = locations
  Jsii::Type.check_type(@locations, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "locations") unless @locations.nil?
  @restriction_type = restriction_type
  Jsii::Type.check_type(@restriction_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "restrictionType") unless @restriction_type.nil?
end

Instance Attribute Details

#locationsArray<String>? (readonly)

The locations for geographic restrictions.



812
813
814
# File 'cloud_front/cfn_distribution_tenant.rb', line 812

def locations
  @locations
end

#restriction_typeString? (readonly)

The method that you want to use to restrict distribution of your content by country:.

  • none : No geographic restriction is enabled, meaning access to content is not restricted by client geo location.
  • blacklist : The Location elements specify the countries in which you don't want CloudFront to distribute your content.
  • whitelist : The Location elements specify the countries in which you want CloudFront to distribute your content.


821
822
823
# File 'cloud_front/cfn_distribution_tenant.rb', line 821

def restriction_type
  @restriction_type
end

Class Method Details

.jsii_propertiesObject



823
824
825
826
827
828
# File 'cloud_front/cfn_distribution_tenant.rb', line 823

def self.jsii_properties
  {
    :locations => "locations",
    :restriction_type => "restrictionType",
  }
end

Instance Method Details

#to_jsiiObject



830
831
832
833
834
835
836
837
# File 'cloud_front/cfn_distribution_tenant.rb', line 830

def to_jsii
  result = {}
  result.merge!({
    "locations" => @locations,
    "restrictionType" => @restriction_type,
  })
  result.compact
end