Package com.amazonaws.regions
Class Region
java.lang.Object
com.amazonaws.regions.Region
Metadata for an AWS region, including its name and what services
are available in it.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends AmazonWebServiceClient>
TcreateClient
(Class<T> serviceClass, AWSCredentialsProvider credentials, ClientConfiguration config) Creates a new service client of the class given and configures it.boolean
Returns a immutable collection of all endpoints available in the metadata.Returns the domain for this region; ex: "amazonaws.com".getName()
The unique system ID for this region; ex: "us-east-1".Returns the partition this region is in.static Region
Returns the region with the id given, or null if it cannot be found in the current regions.xml file.getServiceEndpoint
(String serviceName) Returns the endpoint for the service given.int
hashCode()
boolean
hasHttpEndpoint
(String serviceName) Returns whether the given service support the http protocol in this region.boolean
hasHttpsEndpoint
(String serviceName) Returns whether the given service support the https protocol in this region.boolean
isServiceSupported
(String serviceName) Returns whether the given service is supported in this region.toString()
-
Constructor Details
-
Region
-
-
Method Details
-
getRegion
Returns the region with the id given, or null if it cannot be found in the current regions.xml file. -
getName
The unique system ID for this region; ex: "us-east-1".- Returns:
- The unique system ID for this region.
-
getDomain
Returns the domain for this region; ex: "amazonaws.com".- Returns:
- The domain for this region.
-
getPartition
Returns the partition this region is in. I.E. 'aws' or 'aws-cn'- Returns:
- The partition this region is in.
-
getServiceEndpoint
Returns the endpoint for the service given.- See Also:
-
isServiceSupported
Returns whether the given service is supported in this region.- See Also:
-
hasHttpsEndpoint
Returns whether the given service support the https protocol in this region.- See Also:
-
hasHttpEndpoint
Returns whether the given service support the http protocol in this region.- See Also:
-
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.classcredentials
- The credentials provider to use, or null for the default credentials providerconfig
- The configuration to use, or null for the default configuration- See Also:
-
equals
-
hashCode
public int hashCode() -
toString
-