Package com.amazonaws.regions
Interface RegionMetadataProvider
-
- All Known Implementing Classes:
AbstractRegionMetadataProvider
,InMemoryRegionsProvider
,PartitionMetadataProvider
public interface RegionMetadataProvider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method 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)
Deprecated.sdk no longer holds the complete endpoint for every service in the region.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.
-
-
-
Method Detail
-
getRegions
List<Region> getRegions()
Returns an immutable list of all regions known to this region metadata object, in no particular order.- Returns:
- an immutable list of all regions
-
getRegion
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. Otherwise, returns null.- Parameters:
regionName
- the name of the region to search for- Returns:
- the corresponding region, if it exists or derived.
-
getRegionsForService
List<Region> getRegionsForService(String serviceName)
Returns a list of the regions that support the service given.- Parameters:
serviceName
- the service abbreviation to search for- Returns:
- the list of regions with support for the given service
- See Also:
ServiceAbbreviations
-
getRegionByEndpoint
@Deprecated Region getRegionByEndpoint(String endpoint)
Deprecated.sdk no longer holds the complete endpoint for every service in the region. It now uses the partition metadata to compute the endpoints dynamically for new regions and services.Searches through all known regions to find one with any service at the specified endpoint. If no region is found with a service at that endpoint, an exception is thrown.- Parameters:
endpoint
- The endpoint for any service residing in the desired region.- Returns:
- The region containing any service running at the specified endpoint, otherwise an exception is thrown if no region is found with a service at the specified endpoint.
- Throws:
IllegalArgumentException
- If the given URL is malformed, or if the one of the service URLs on record is malformed.
-
-