Menu
AWS CloudFormation
User Guide (API Version 2010-05-15)

CloudFront DistributionConfig Restrictions GeoRestriction

GeoRestriction is a property of the CloudFront DistributionConfiguration Restrictions property that describes the countries in which Amazon CloudFront allows viewers to access your content.

Syntax

JSON

Copy
{ "Locations" : [ String, ... ], "RestrictionType" : String }

YAML

Copy
Locations: - String RestrictionType: String

Properties

Note

For more information about the constraints and valid values of each property, see the GeoRestriction data type in the Amazon CloudFront API Reference.

Locations

The two-letter, uppercase country code for a country that you want to include in your blacklist or whitelist.

Required: Conditional. Required if you specified blacklist or whitelist for the RestrictionType property.

Type: List of strings

RestrictionType

The method to restrict distribution of your content:

blacklist

Prevents viewers in the countries that you specified from accessing your content.

whitelist

Allows viewers in the countries that you specified to access your content.

none

No distribution restrictions by country.

Required: Yes

Type: String