com.amazonaws.regions
Class Region

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

public final class Region
extends java.lang.Object

Metadata for an AWS region, including its name and what services are available in it.


Method Summary
<T extends AmazonWebServiceClient>
T
createClient(java.lang.Class<T> serviceClass, AWSCredentialsProvider credentials, ClientConfiguration config)
          Creates a new service client of the class given and configures it.
 boolean equals(java.lang.Object obj)
           
 java.lang.String getDomain()
          Returns the domain for this region; ex: "amazonaws.com".
 java.lang.String getName()
          The unique system ID for this region; ex: "us-east-1".
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.
 java.lang.String getServiceEndpoint(java.lang.String serviceName)
          Returns the endpoint for the service given.
 int hashCode()
           
 boolean hasHttpEndpoint(java.lang.String serviceName)
          Returns whether the given service support the http protocol in this region.
 boolean hasHttpsEndpoint(java.lang.String serviceName)
          Returns whether the given service support the https protocol in this region.
 boolean isServiceSupported(java.lang.String serviceName)
          Returns whether the given service is supported in this region.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

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 java.lang.String getName()
The unique system ID for this region; ex: "us-east-1".

Returns:
The unique system ID for this region.

getDomain

public java.lang.String getDomain()
Returns the domain for this region; ex: "amazonaws.com".

Returns:
The domain for this region.

getServiceEndpoint

public java.lang.String getServiceEndpoint(java.lang.String serviceName)
Returns the endpoint for the service given.

See Also:
ServiceAbbreviations

isServiceSupported

public boolean isServiceSupported(java.lang.String serviceName)
Returns whether the given service is supported in this region.

See Also:
ServiceAbbreviations

hasHttpsEndpoint

public boolean hasHttpsEndpoint(java.lang.String serviceName)
Returns whether the given service support the https protocol in this region.

See Also:
ServiceAbbreviations

hasHttpEndpoint

public boolean hasHttpEndpoint(java.lang.String serviceName)
Returns whether the given service support the http protocol in this region.

See Also:
ServiceAbbreviations

createClient

public <T extends AmazonWebServiceClient> T createClient(java.lang.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

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.