public interface RegionMetadataProvider
Modifier and Type | Method and Description |
---|---|
Region |
getRegion(String regionName)
Returns the region with the name given, if it exists in the metadata
or if it can be derived from the metadata.
|
Region |
getRegionByEndpoint(String endpoint)
Searches through all known regions to find one with any service at the
specified endpoint.
|
List<Region> |
getRegions()
Returns an immutable list of all regions known to this region metadata
object, in no particular order.
|
List<Region> |
getRegionsForService(String serviceName)
Returns a list of the regions that support the service given.
|
Region |
tryGetRegionByEndpointDnsSuffix(String endpoint)
Returns the region associated with the specified endpoint by searching the endpoint configuration for a partition
that matches the DNS suffix of the provided endpoint and extracting the region name based on the endpoint pattern for
that partition.
|
Region |
tryGetRegionByExplicitEndpoint(String endpoint)
Returns the region associated with the specified endpoint by searching the endpoint configuration for an endpoint
that is explicitly listed.
|
List<Region> getRegions()
Region getRegion(String regionName)
regionName
- the name of the region to search forList<Region> getRegionsForService(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.Region getRegionByEndpoint(String endpoint)
endpoint
- The endpoint for any service residing in the desired region.Region tryGetRegionByExplicitEndpoint(String endpoint)
RegionMetadataProvider.getRegionByEndpoint(String)
, this returns null on failure instead of raising an exception.endpoint
- The endpoint to look up in the region metadata.Region tryGetRegionByEndpointDnsSuffix(String endpoint)
RegionMetadataProvider.getRegionByEndpoint(String)
, this returns null on failure instead of raising an exception.endpoint
- The endpoint to look up in the region metadata based on the DNS suffix.Copyright © 2024. All rights reserved.