Class RegionSet


  • @Immutable
    public final class RegionSet
    extends Object
    This class represents the concept of a set of regions.

    A region-set can contain one or more comma-separated AWS regions, or a single wildcard to represent all regions ("global"). Whitespace is trimmed from entries of the set.

    Examples of region-sets:

    • '*' - Represents all regions, global
    • 'eu-west-1' - Represents a single region, eu-west-1
    • 'us-west-2,us-east-1' - Represents 2 regions, us-west-2 and us-east-1
    • Field Detail

      • GLOBAL

        public static final RegionSet GLOBAL
        The "Global" region, which is represented with a single wildcard character: "*".
    • Method Detail

      • asString

        public String asString()
        Gets the string representation of this RegionSet.
      • asSet

        public Set<String> asSet()
        Gets the set of strings that represent this RegionSet.
      • create

        public static RegionSet create​(String value)
        Creates a RegionSet with the supplied region-set string.
        Parameters:
        value - See class documentation RegionSet for the expected format.
      • create

        public static RegionSet create​(Collection<String> regions)
        Creates a RegionSet from the supplied collection.
        Parameters:
        regions - A collection of regions.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object