Package com.amazonaws.regions
Enum Regions
- All Implemented Interfaces:
Serializable
,Comparable<Regions>
,java.lang.constant.Constable
Enumeration of region names
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Regions
The default region that new customers in the US are encouraged to use when using AWS services for the first time. -
Method Summary
Modifier and TypeMethodDescriptionstatic Regions
Returns a region enum corresponding to the given region name.static Region
Returns a Region object representing the region the application is running in, when running in EC2.getName()
The name of this region, used in the regions.xml file to identify it.static Regions
Returns the enum constant of this type with the specified name.static Regions[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
GovCloud
-
US_EAST_1
-
US_WEST_1
-
US_WEST_2
-
EU_WEST_1
-
EU_CENTRAL_1
-
AP_SOUTHEAST_1
-
AP_SOUTHEAST_2
-
AP_NORTHEAST_1
-
AP_NORTHEAST_2
-
SA_EAST_1
-
CN_NORTH_1
-
-
Field Details
-
DEFAULT_REGION
The default region that new customers in the US are encouraged to use when using AWS services for the first time.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getName
The name of this region, used in the regions.xml file to identify it. -
fromName
Returns a region enum corresponding to the given region name.- Parameters:
regionName
- The name of the region. Ex.: eu-west-1- Returns:
- Region enum representing the given region name.
-
getCurrentRegion
Returns a Region object representing the region the application is running in, when running in EC2. If this method is called from a non-EC2 environment, it will return null.
-