ToCopyableBuilder<GeoRestriction.Builder,GeoRestriction>
@Generated("software.amazon.awssdk:codegen") public class GeoRestriction extends Object implements ToCopyableBuilder<GeoRestriction.Builder,GeoRestriction>
A complex type that controls the countries in which your content is distributed. CloudFront determines the location
of your users using MaxMind
GeoIP databases.
Modifier and Type | Class | Description |
---|---|---|
static interface |
GeoRestriction.Builder |
Modifier and Type | Method | Description |
---|---|---|
static GeoRestriction.Builder |
builder() |
|
boolean |
equals(Object obj) |
|
int |
hashCode() |
|
List<String> |
items() |
A complex type that contains a
Location element for each country in which you want CloudFront either
to distribute your content (whitelist ) or not distribute your content (blacklist ). |
Integer |
quantity() |
When geo restriction is
enabled , this is the number of countries in your whitelist or
blacklist . |
String |
restrictionType() |
The method that you want to use to restrict distribution of your content by country:
|
static Class<? extends GeoRestriction.Builder> |
serializableBuilderClass() |
|
GeoRestriction.Builder |
toBuilder() |
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
public String restrictionType()
The method that you want to use to restrict distribution of your content by country:
none
: No geo restriction is enabled, meaning access to content is not restricted by client geo
location.
blacklist
: The Location
elements specify the countries in which you do not want
CloudFront to distribute your content.
whitelist
: The Location
elements specify the countries in which you want CloudFront to
distribute your content.
none
: No geo restriction is enabled, meaning access to content is not restricted by client
geo location.
blacklist
: The Location
elements specify the countries in which you do not want
CloudFront to distribute your content.
whitelist
: The Location
elements specify the countries in which you want
CloudFront to distribute your content.
GeoRestrictionType
public Integer quantity()
When geo restriction is enabled
, this is the number of countries in your whitelist
or
blacklist
. Otherwise, when it is not enabled, Quantity
is 0
, and you can
omit Items
.
enabled
, this is the number of countries in your
whitelist
or blacklist
. Otherwise, when it is not enabled,
Quantity
is 0
, and you can omit Items
.public List<String> items()
A complex type that contains a Location
element for each country in which you want CloudFront either
to distribute your content (whitelist
) or not distribute your content (blacklist
).
The Location
element is a two-letter, uppercase country code for a country that you want to include
in your blacklist
or whitelist
. Include one Location
element for each
country.
CloudFront and MaxMind
both use ISO 3166
country codes. For the current list of
countries and the corresponding codes, see ISO 3166-1-alpha-2
code on the International
Organization for Standardization website. You can also refer to the country list in the CloudFront console,
which includes both country names and codes.
Location
element for each country in which you want
CloudFront either to distribute your content (whitelist
) or not distribute your content (
blacklist
).
The Location
element is a two-letter, uppercase country code for a country that you want to
include in your blacklist
or whitelist
. Include one Location
element for each country.
CloudFront and MaxMind
both use ISO 3166
country codes. For the current list of
countries and the corresponding codes, see ISO 3166-1-alpha-2
code on the International
Organization for Standardization website. You can also refer to the country list in the CloudFront
console, which includes both country names and codes.
public GeoRestriction.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<GeoRestriction.Builder,GeoRestriction>
public static GeoRestriction.Builder builder()
public static Class<? extends GeoRestriction.Builder> serializableBuilderClass()
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.