@Generated(value="software.amazon.awssdk:codegen") public final 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 and Description |
---|---|
static interface |
GeoRestriction.Builder |
Modifier and Type | Method and Description |
---|---|
static GeoRestriction.Builder |
builder() |
boolean |
equals(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
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 . |
GeoRestrictionType |
restrictionType()
The method that you want to use to restrict distribution of your content by country:
|
String |
restrictionTypeAsString()
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() |
copy
public GeoRestrictionType 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 don't want
CloudFront to distribute your content.
whitelist
: The Location
elements specify the countries in which you want CloudFront to
distribute your content.
If the service returns an enum value that is not available in the current SDK version, restrictionType
will return GeoRestrictionType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available
from restrictionTypeAsString()
.
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 don't want
CloudFront to distribute your content.
whitelist
: The Location
elements specify the countries in which you want
CloudFront to distribute your content.
GeoRestrictionType
public String restrictionTypeAsString()
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 don't want
CloudFront to distribute your content.
whitelist
: The Location
elements specify the countries in which you want CloudFront to
distribute your content.
If the service returns an enum value that is not available in the current SDK version, restrictionType
will return GeoRestrictionType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available
from restrictionTypeAsString()
.
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 don't 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 on the CloudFront console,
which includes both country names and codes.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
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 on 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.