1 | /**
|
2 | * Controls the countries in which content is distributed.
|
3 | */
|
4 | export declare class GeoRestriction {
|
5 | readonly restrictionType: 'whitelist' | 'blacklist';
|
6 | readonly locations: string[];
|
7 | /**
|
8 | * Allow specific countries which you want CloudFront to distribute your content.
|
9 | *
|
10 | * @param locations Two-letter, uppercase country code for a country
|
11 | * that you want to allow. Include one element for each country.
|
12 | * See ISO 3166-1-alpha-2 code on the *International Organization for Standardization* website
|
13 | */
|
14 | static allowlist(...locations: string[]): GeoRestriction;
|
15 | /**
|
16 | * Deny specific countries which you don't want CloudFront to distribute your content.
|
17 | *
|
18 | * @param locations Two-letter, uppercase country code for a country
|
19 | * that you want to deny. Include one element for each country.
|
20 | * See ISO 3166-1-alpha-2 code on the *International Organization for Standardization* website
|
21 | */
|
22 | static denylist(...locations: string[]): GeoRestriction;
|
23 | /**
|
24 | * DEPRECATED
|
25 | * @deprecated use `allowlist`
|
26 | */
|
27 | static whitelist(...locations: string[]): GeoRestriction;
|
28 | /**
|
29 | * DEPRECATED
|
30 | * @deprecated use `denylist`
|
31 | */
|
32 | static blacklist(...locations: string[]): GeoRestriction;
|
33 | private static LOCATION_REGEX;
|
34 | private static validateLocations;
|
35 | /**
|
36 | * Creates an instance of GeoRestriction for internal use
|
37 | *
|
38 | * @param restrictionType Specifies the restriction type to impose
|
39 | * @param locations Two-letter, uppercase country code for a country
|
40 | * that you want to allow/deny. Include one element for each country.
|
41 | * See ISO 3166-1-alpha-2 code on the *International Organization for Standardization* website
|
42 | */
|
43 | private constructor();
|
44 | }
|