Enum Class AwsRegion

java.lang.Object
java.lang.Enum<AwsRegion>
com.cloudforge.core.enums.AwsRegion
All Implemented Interfaces:
Serializable, Comparable<AwsRegion>, Constable

public enum AwsRegion extends Enum<AwsRegion>
AWS Regions enumeration with metadata for disaster recovery and compliance.

Each region includes:

  • Region code (e.g., "us-east-1")
  • Display name (e.g., "US East (N. Virginia)")
  • Geographic area for data residency
  • Paired DR region for cross-region replication
  • Enum Constant Details

    • US_EAST_1

      public static final AwsRegion US_EAST_1
    • US_EAST_2

      public static final AwsRegion US_EAST_2
    • US_WEST_1

      public static final AwsRegion US_WEST_1
    • US_WEST_2

      public static final AwsRegion US_WEST_2
    • US_GOV_EAST_1

      public static final AwsRegion US_GOV_EAST_1
    • US_GOV_WEST_1

      public static final AwsRegion US_GOV_WEST_1
    • CA_CENTRAL_1

      public static final AwsRegion CA_CENTRAL_1
    • CA_WEST_1

      public static final AwsRegion CA_WEST_1
    • EU_WEST_1

      public static final AwsRegion EU_WEST_1
    • EU_WEST_2

      public static final AwsRegion EU_WEST_2
    • EU_WEST_3

      public static final AwsRegion EU_WEST_3
    • EU_CENTRAL_1

      public static final AwsRegion EU_CENTRAL_1
    • EU_CENTRAL_2

      public static final AwsRegion EU_CENTRAL_2
    • EU_NORTH_1

      public static final AwsRegion EU_NORTH_1
    • EU_SOUTH_1

      public static final AwsRegion EU_SOUTH_1
    • EU_SOUTH_2

      public static final AwsRegion EU_SOUTH_2
    • AP_EAST_1

      public static final AwsRegion AP_EAST_1
    • AP_SOUTH_1

      public static final AwsRegion AP_SOUTH_1
    • AP_SOUTH_2

      public static final AwsRegion AP_SOUTH_2
    • AP_SOUTHEAST_1

      public static final AwsRegion AP_SOUTHEAST_1
    • AP_SOUTHEAST_2

      public static final AwsRegion AP_SOUTHEAST_2
    • AP_SOUTHEAST_3

      public static final AwsRegion AP_SOUTHEAST_3
    • AP_SOUTHEAST_4

      public static final AwsRegion AP_SOUTHEAST_4
    • AP_NORTHEAST_1

      public static final AwsRegion AP_NORTHEAST_1
    • AP_NORTHEAST_2

      public static final AwsRegion AP_NORTHEAST_2
    • AP_NORTHEAST_3

      public static final AwsRegion AP_NORTHEAST_3
    • SA_EAST_1

      public static final AwsRegion SA_EAST_1
    • ME_SOUTH_1

      public static final AwsRegion ME_SOUTH_1
    • ME_CENTRAL_1

      public static final AwsRegion ME_CENTRAL_1
    • IL_CENTRAL_1

      public static final AwsRegion IL_CENTRAL_1
    • AF_SOUTH_1

      public static final AwsRegion AF_SOUTH_1
  • Method Details

    • values

      public static AwsRegion[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AwsRegion valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • code

      public String code()
      Gets the region code (e.g., "us-east-1").
    • displayName

      public String displayName()
      Gets the display name (e.g., "US East (N. Virginia)").
    • geoArea

      public AwsRegion.GeoArea geoArea()
      Gets the geographic area for data residency.
    • drRegionCode

      public String drRegionCode()
      Gets the disaster recovery region code.
    • drRegion

      public Optional<AwsRegion> drRegion()
      Gets the disaster recovery region enum.
    • fromCode

      public static Optional<AwsRegion> fromCode(String code)
      Finds a region by its code.
      Parameters:
      code - The region code (e.g., "us-east-1")
      Returns:
      Optional containing the region, or empty if not found
    • getSecondaryRegion

      public static Optional<String> getSecondaryRegion(String regionCode)
      Gets the secondary (DR) region for a given region code.
      Parameters:
      regionCode - The primary region code (e.g., "us-east-1")
      Returns:
      Optional containing the secondary region code, or empty if not found
    • isValidRegion

      public static boolean isValidRegion(String code)
      Checks if a region code is valid.
      Parameters:
      code - The region code to validate
      Returns:
      true if the region code is valid
    • sameGeoArea

      public static boolean sameGeoArea(String region1, String region2)
      Checks if two regions are in the same geographic area. Useful for data residency compliance.
      Parameters:
      region1 - First region code
      region2 - Second region code
      Returns:
      true if both regions are in the same geo area