public interface ServiceMetadata
This is useful for building meta-functionality around AWS services. For example, UIs that list the available regions for a
service would use the regions()
method for a service.
This is usually created by calling the serviceMetadata
method on the service client's interface, but can also be
created by calling the of(String)
method and providing the service's unique endpoint prefix.
Modifier and Type | Method and Description |
---|---|
default String |
computeEndpoint(String endpointPrefix,
Map<String,String> partitionOverriddenEndpoints,
Region region) |
URI |
endpointFor(Region region)
Retrieve the AWS endpoint that should be used for this service in the provided region.
|
static ServiceMetadata |
of(String serviceEndpointPrefix)
Load the service metadata for the provided service endpoint prefix.
|
default ServiceMetadata |
reconfigure(Consumer<ServiceMetadataConfiguration.Builder> consumer)
Reconfigure this service metadata using the provided
ServiceMetadataConfiguration . |
default ServiceMetadata |
reconfigure(ServiceMetadataConfiguration configuration)
Reconfigure this service metadata using the provided
ServiceMetadataConfiguration . |
List<Region> |
regions()
Retrieve the list of regions this service is currently available in.
|
List<ServicePartitionMetadata> |
servicePartitions()
Retrieve the service-specific partition configuration of each partition in which this service is currently available.
|
Region |
signingRegion(Region region)
Retrieve the region that should be used for message signing when communicating with this service in the provided region.
|
URI endpointFor(Region region)
region
- The region that should be used to load the service endpoint.Region signingRegion(Region region)
Region.AWS_GLOBAL
.region
- The region from which the signing region should be derived.List<Region> regions()
List<ServicePartitionMetadata> servicePartitions()
static ServiceMetadata of(String serviceEndpointPrefix)
serviceMetadata()
method.serviceEndpointPrefix
- The service-specific endpoint prefix of the service about which you wish to load metadata.default String computeEndpoint(String endpointPrefix, Map<String,String> partitionOverriddenEndpoints, Region region)
default ServiceMetadata reconfigure(ServiceMetadataConfiguration configuration)
ServiceMetadataConfiguration
. This is useful, because some
service metadata instances refer to external configuration that might wish to be modified, like a ProfileFile
.default ServiceMetadata reconfigure(Consumer<ServiceMetadataConfiguration.Builder> consumer)
ServiceMetadataConfiguration
. This is useful, because some
service metadata instances refer to external configuration that might wish to be modified, like a ProfileFile
.
This is a shorthand form of reconfigure(ServiceMetadataConfiguration)
, without the need to call
builder()
or build()
.Copyright © 2020. All rights reserved.