GeoRestriction

class aws_cdk.aws_cloudfront.GeoRestriction(*args, **kwargs)

Bases: object

Controls the countries in which content is distributed.

stability :stability: experimental

Attributes

locations

Two-letter, uppercase country code for a country that you want to whitelist/blacklist.

Include one element for each country. See ISO 3166-1-alpha-2 code on the International Organization for Standardization website

stability :stability: experimental

Return type

List[str]

restriction_type

Specifies the restriction type to impose (whitelist or blacklist).

stability :stability: experimental

Return type

str

Static Methods

classmethod blacklist(*locations)

Blacklist specific countries which you don’t want CloudFront to distribute your content.

Parameters

locations (str) – Two-letter, uppercase country code for a country that you want to blacklist. Include one element for each country. See ISO 3166-1-alpha-2 code on the International Organization for Standardization website

stability :stability: experimental

Return type

GeoRestriction

classmethod whitelist(*locations)

Whitelist specific countries which you want CloudFront to distribute your content.

Parameters

locations (str) – Two-letter, uppercase country code for a country that you want to whitelist. Include one element for each country. See ISO 3166-1-alpha-2 code on the International Organization for Standardization website

stability :stability: experimental

Return type

GeoRestriction