Class: AWSCDK::CloudFront::CfnDistribution::RestrictionsProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudFront::CfnDistribution::RestrictionsProperty
- Defined in:
- cloud_front/cfn_distribution.rb
Overview
A complex type that identifies ways in which you want to restrict distribution of your content.
Instance Attribute Summary collapse
-
#geo_restriction ⇒ AWSCDK::IResolvable, AWSCDK::CloudFront::CfnDistribution::GeoRestrictionProperty
readonly
A complex type that controls the countries in which your content is distributed.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(geo_restriction:) ⇒ RestrictionsProperty
constructor
A new instance of RestrictionsProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(geo_restriction:) ⇒ RestrictionsProperty
Returns a new instance of RestrictionsProperty.
3083 3084 3085 3086 |
# File 'cloud_front/cfn_distribution.rb', line 3083 def initialize(geo_restriction:) @geo_restriction = geo_restriction.is_a?(Hash) ? ::AWSCDK::CloudFront::CfnDistribution::GeoRestrictionProperty.new(**geo_restriction.transform_keys(&:to_sym)) : geo_restriction Jsii::Type.check_type(@geo_restriction, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZGZyb250LkNmbkRpc3RyaWJ1dGlvbi5HZW9SZXN0cmljdGlvblByb3BlcnR5In1dfX0=")), "geoRestriction") end |
Instance Attribute Details
#geo_restriction ⇒ AWSCDK::IResolvable, AWSCDK::CloudFront::CfnDistribution::GeoRestrictionProperty (readonly)
A complex type that controls the countries in which your content is distributed.
CloudFront determines the location of your users using MaxMind GeoIP databases. To disable geo restriction, remove the Restrictions property from your stack template.
3094 3095 3096 |
# File 'cloud_front/cfn_distribution.rb', line 3094 def geo_restriction @geo_restriction end |
Class Method Details
.jsii_properties ⇒ Object
3096 3097 3098 3099 3100 |
# File 'cloud_front/cfn_distribution.rb', line 3096 def self.jsii_properties { :geo_restriction => "geoRestriction", } end |
Instance Method Details
#to_jsii ⇒ Object
3102 3103 3104 3105 3106 3107 3108 |
# File 'cloud_front/cfn_distribution.rb', line 3102 def to_jsii result = {} result.merge!({ "geoRestriction" => @geo_restriction, }) result.compact end |