Interface ConfigurableRegionProvider
- All Superinterfaces:
software.amazon.awssdk.regions.providers.AwsRegionProvider
- All Known Implementing Classes:
Route53RegionProvider
public interface ConfigurableRegionProvider
extends software.amazon.awssdk.regions.providers.AwsRegionProvider
Extension of
AwsRegionProvider that supports configuration via a
parameter map. Implementations must provide a constructor that accepts a
Map<String, String> of configuration parameters.
The static getInstance(String) factory parses a descriptor string
in the format className?param1=value1;param2=value2 and instantiates
the target class by passing the parsed parameters to its map constructor.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ConfigurableRegionProvidergetInstance(String descriptor) Parse a descriptor string and instantiate the correspondingConfigurableRegionProvider.software.amazon.awssdk.regions.RegionResolve the region using a provided host as context.Methods inherited from interface software.amazon.awssdk.regions.providers.AwsRegionProvider
getRegion
-
Method Details
-
getRegion
Resolve the region using a provided host as context.- Parameters:
host- the host to use for region resolution- Returns:
- the resolved AWS
Region
-
getInstance
Parse a descriptor string and instantiate the correspondingConfigurableRegionProvider.Descriptor format:
fully.qualified.ClassName?key1=val1;key2=val2
The query-string portion is optional. When omitted an empty map is passed to the constructor.- Parameters:
descriptor- class name with optional parameters- Returns:
- a configured instance of the provider
- Throws:
IllegalArgumentException- if the descriptor is null/blank or the class cannot be instantiated
-