public class AwsHostNameUtils extends Object
Constructor and Description |
---|
AwsHostNameUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
localHostName()
Returns the host name for the local host.
|
static String |
parseRegion(String host,
String serviceHint)
Attempts to parse the region name from an endpoint based on conventions
about the endpoint format.
|
static String |
parseRegionFromAfterServiceName(String host,
String serviceHint)
Parse the region by looking for the service name in the hostname and assuming anything that follows it (separated by
a .
|
static String |
parseRegionFromAwsPartitionPattern(String host)
Parse the region from the host name, if it's in the standard AWS parition (ending in amazonaws.com).
|
static String |
parseRegionFromInternalConfig(String host)
Parse the region from the host name using any internal configuration regex patterns that are available.
|
static String |
parseRegionName(String host,
String serviceHint)
Deprecated.
in favor of
AwsHostNameUtils.parseRegion(String, String) . |
static String |
parseRegionName(URI endpoint)
Deprecated.
in favor of
AwsHostNameUtils.parseRegionName(String, String) . |
static String |
parseRegionUsingServiceHint(String host,
String serviceHint)
Parse the region using service-specific logic from the host name.
|
static String |
parseServiceName(URI endpoint)
Deprecated.
|
@Deprecated public static String parseRegionName(URI endpoint)
AwsHostNameUtils.parseRegionName(String, String)
.@Deprecated public static String parseRegionName(String host, String serviceHint)
AwsHostNameUtils.parseRegion(String, String)
.host
- the hostname to parseserviceHint
- an optional hint about the service for the endpointpublic static String parseRegion(String host, String serviceHint)
host
- the hostname to parseserviceHint
- an optional hint about the service for the endpointpublic static String parseRegionFromInternalConfig(String host)
public static String parseRegionFromAwsPartitionPattern(String host)
public static String parseRegionUsingServiceHint(String host, String serviceHint)
public static String parseRegionFromAfterServiceName(String host, String serviceHint)
@Deprecated public static String parseServiceName(URI endpoint)
public static String localHostName()
Copyright © 2024. All rights reserved.