JavaScript is disabled on your browser.
Skip navigation links

AWS SDK for Java 1.x API Reference - 1.12.793

We announced the upcoming end-of-support for AWS SDK for Java (v1). We recommend that you migrate to AWS SDK for Java v2. For dates, additional details, and information on how to migrate, please refer to the linked announcement.
com.amazonaws.util

Class AwsHostNameUtils



  • public class AwsHostNameUtils
    extends Object 
    • Constructor Detail

      • AwsHostNameUtils

        public AwsHostNameUtils()
    • Method Detail

      • parseRegionName

        @Deprecated
        public static String parseRegionName(String host,
         String serviceHint)
        Deprecated. in favor of parseRegion(String, String).
        Attempts to parse the region name from an endpoint based on conventions about the endpoint format.
        Parameters:
        host - the hostname to parse
        serviceHint - an optional hint about the service for the endpoint
        Returns:
        the region parsed from the hostname, or "us-east-1" if no region information could be found.
      • parseRegion

        public static String parseRegion(String host,
         String serviceHint)
        Attempts to parse the region name from an endpoint based on conventions about the endpoint format. This does not consider any properties in the endpoint configuration from the service.
        Parameters:
        host - the hostname to parse
        serviceHint - an optional hint about the service for the endpoint
        Returns:
        the region parsed from the hostname, or null if no region information could be found.
      • parseRegionFromInternalConfig

        public static String parseRegionFromInternalConfig(String host)
        Parse the region from the host name using any internal configuration regex patterns that are available. Returns null if it cannot be parsed from the internal configuration.
      • parseRegionFromAwsPartitionPattern

        public static String parseRegionFromAwsPartitionPattern(String host)
        Parse the region from the host name, if it's in the standard AWS parition (ending in amazonaws.com). Returns null if it cannot be parsed from the standard partition pattern.
      • parseRegionUsingServiceHint

        public static String parseRegionUsingServiceHint(String host,
         String serviceHint)
        Parse the region using service-specific logic from the host name. Returns null if it cannot be parsed from the host using service-specific logic.
      • parseRegionFromAfterServiceName

        public 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 . or a -) is the region. Returns null if this process fails.
      • parseServiceName

        @Deprecated
        public static String parseServiceName(URI endpoint)
        Deprecated.
        Parses the service name from an endpoint. Can only handle endpoints of the form 'service.[region.]amazonaws.com'.
      • localHostName

        public static String localHostName()
        Returns the host name for the local host. If the operation is not allowed by the security check, the textual representation of the IP address of the local host is returned instead. If the ip address of the local host cannot be resolved or if there is any other failure, "localhost" is returned as a fallback.
Skip navigation links

AltStyle によって変換されたページ (->オリジナル) /