public class Region extends Object
Constructor and Description |
---|
Region(RegionImpl regionImpl) |
Modifier and Type | Method and Description |
---|---|
<T extends AmazonWebServiceClient> |
createClient(Class<T> serviceClass,
AWSCredentialsProvider credentials,
ClientConfiguration config)
Deprecated.
use appropriate
AwsClientBuilder implementation
for the service being constructed. For example:
AmazonSNSClientBuilder.standard().withRegion(region).build(); |
boolean |
equals(Object obj) |
Collection<String> |
getAvailableEndpoints()
Returns a immutable collection of all endpoints available in the
metadata.
|
String |
getDomain()
Returns the domain for this region; ex: "amazonaws.com".
|
String |
getName()
The unique system ID for this region; ex: "us-east-1".
|
String |
getPartition()
Returns the partition this region is in.
|
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.
|
String |
getServiceEndpoint(String endpointPrefix)
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.
|
String |
toString() |
public Region(RegionImpl regionImpl)
public static Region getRegion(Regions region)
public String getName()
public String getDomain()
public String getPartition()
public String getServiceEndpoint(String endpointPrefix)
endpointPrefix
- The service endpoint prefix which can be retrieved from the
constant ENDPOINT_PREFIX of the specific service client interface,
e.g. AmazonEC2.ENDPOINT_PREFIX.public boolean isServiceSupported(String serviceName)
serviceName
- The service endpoint prefix which can be retrieved from the
constant ENDPOINT_PREFIX of the specific service client interface,
e.g. AmazonEC2.ENDPOINT_PREFIX.public boolean hasHttpsEndpoint(String serviceName)
serviceName
- The service endpoint prefix which can be retrieved from the
constant ENDPOINT_PREFIX of the specific service client interface,
e.g. AmazonEC2.ENDPOINT_PREFIX.public boolean hasHttpEndpoint(String serviceName)
serviceName
- The service endpoint prefix which can be retrieved from the
constant ENDPOINT_PREFIX of the specific service client interface,
e.g. AmazonEC2.ENDPOINT_PREFIX.public Collection<String> getAvailableEndpoints()
@Deprecated public <T extends AmazonWebServiceClient> T createClient(Class<T> serviceClass, AWSCredentialsProvider credentials, ClientConfiguration config)
AwsClientBuilder
implementation
for the service being constructed. For example:
AmazonSNSClientBuilder.standard().withRegion(region).build();
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
configurationCopyright © 2022. All rights reserved.