Class Region


  • public class Region
    extends Object
    Metadata for an AWS region, including its name and what services are available in it.
    • Constructor Detail

      • Region

        public Region​(RegionImpl regionImpl)
    • Method Detail

      • getRegion

        public static Region getRegion​(Regions region)
        Returns the region with the id given, or null if it cannot be found in the current regions.xml file.
      • getName

        public String getName()
        The unique system ID for this region; ex: "us-east-1".
        Returns:
        The unique system ID for this region.
      • getDomain

        public String getDomain()
        Returns the domain for this region; ex: "amazonaws.com".
        Returns:
        The domain for this region.
      • getPartition

        public String getPartition()
        Returns the partition this region is in. I.E. 'aws' or 'aws-cn'
        Returns:
        The partition this region is in.
      • isServiceSupported

        public boolean isServiceSupported​(String serviceName)
        Returns whether the given service is supported in this region.
        See Also:
        ServiceAbbreviations
      • hasHttpsEndpoint

        public boolean hasHttpsEndpoint​(String serviceName)
        Returns whether the given service support the https protocol in this region.
        See Also:
        ServiceAbbreviations
      • hasHttpEndpoint

        public boolean hasHttpEndpoint​(String serviceName)
        Returns whether the given service support the http protocol in this region.
        See Also:
        ServiceAbbreviations
      • getAvailableEndpoints

        public Collection<String> getAvailableEndpoints()
        Returns a immutable collection of all endpoints available in the metadata.
      • createClient

        public <T extends AmazonWebServiceClient> T createClient​(Class<T> serviceClass,
                                                                 AWSCredentialsProvider credentials,
                                                                 ClientConfiguration config)
        Creates a new service client of the class given and configures it. If credentials or config are null, defaults will be used.
        Parameters:
        serviceClass - The service client class to instantiate, e.g. AmazonS3Client.class
        credentials - The credentials provider to use, or null for the default credentials provider
        config - The configuration to use, or null for the default configuration
        See Also:
        ServiceAbbreviations
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object