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 URI |
endpointFor(Region region)
Retrieve the AWS endpoint that should be used for this service in the provided region, if no
EndpointTag s are
desired. |
default URI |
endpointFor(ServiceEndpointKey key)
Retrieve the AWS endpoint that should be used for this service associated with the provided
ServiceEndpointKey . |
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.
|
default Region |
signingRegion(Region region)
Retrieve the region that should be used for message signing when communicating with this service in the provided region.
|
default Region |
signingRegion(ServiceEndpointKey key)
Retrieve the region that should be used for message signing when communicating with this service in the provided region
and with the provided endpoint tags.
|
default URI endpointFor(Region region)
EndpointTag
s are
desired.region
- The region that should be used to load the service endpoint.RuntimeException
- if an endpoint cannot be determined.default URI endpointFor(ServiceEndpointKey key)
ServiceEndpointKey
.key
- The service endpoint key with which an endpoint should be retrieved.RuntimeException
- if an endpoint cannot be determined.default Region signingRegion(Region region)
Region.AWS_GLOBAL
.region
- The region from which the signing region should be derived.default Region signingRegion(ServiceEndpointKey key)
Region.AWS_GLOBAL
.key
- The service endpoint key with which an endpoint should be retrieved.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 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 © 2022. All rights reserved.