Class Region

java.lang.Object
com.amazonaws.regions.Region

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

  • Method Details

    • 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.
    • getServiceEndpoint

      public String getServiceEndpoint(String serviceName)
      Returns the endpoint for the service given.
      See Also:
    • isServiceSupported

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

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

      public boolean hasHttpEndpoint(String serviceName)
      Returns whether the given service support the http protocol in this region.
      See Also:
    • 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:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object