@Test public void testParseRegionWithS3SpecialRegions() { assertEquals("us-east-1", AwsHostNameUtils.parseRegion("s3-external-1.amazonaws.com", null)); assertEquals("us-east-1", AwsHostNameUtils.parseRegion("bucket.name.with.periods.s3-external-1.amazonaws.com", null)); assertEquals("us-gov-west-1", AwsHostNameUtils.parseRegion("s3-fips-us-gov-west-1.amazonaws.com", null)); assertEquals("us-gov-west-1", AwsHostNameUtils.parseRegion("bucket.name.with.periods.s3-fips-us-gov-west-1.amazonaws.com", null)); }
public static String parseRegion(String host, String serviceHint) { String result; result = parseRegionFromInternalConfig(host); if (result != null) { return result; } result = parseRegionFromAwsPartitionPattern(host); if (result != null) { return result; } result = parseRegionUsingServiceHint(host, serviceHint); if (result != null) { return result; } result = parseRegionFromAfterServiceName(host, serviceHint); return result; }
AwsHostNameUtils { public static String parseRegion(String host, String serviceHint) { String result; result = parseRegionFromInternalConfig(host); if (result != null) { return result; } result = parseRegionFromAwsPartitionPattern(host); if (result != null) { return result; } result = parseRegionUsingServiceHint(host, serviceHint); if (result != null) { return result; } result = parseRegionFromAfterServiceName(host, serviceHint); return result; } }
AwsHostNameUtils { public static String parseRegion(String host, String serviceHint) { String result; result = parseRegionFromInternalConfig(host); if (result != null) { return result; } result = parseRegionFromAwsPartitionPattern(host); if (result != null) { return result; } result = parseRegionUsingServiceHint(host, serviceHint); if (result != null) { return result; } result = parseRegionFromAfterServiceName(host, serviceHint); return result; }  }
AwsHostNameUtils { public static String parseRegion(String host, String serviceHint) { String result; result = parseRegionFromInternalConfig(host); if (result != null) { return result; } result = parseRegionFromAwsPartitionPattern(host); if (result != null) { return result; } result = parseRegionUsingServiceHint(host, serviceHint); if (result != null) { return result; } result = parseRegionFromAfterServiceName(host, serviceHint); return result; }  @Deprecated static String parseRegionName(URI endpoint); @Deprecated static String parseRegionName(final String host,
                                         final String serviceHint); static String parseRegion(String host, String serviceHint); @SdkProtectedApi static String parseRegionFromInternalConfig(String host); @SdkProtectedApi static String parseRegionFromAwsPartitionPattern(String host); @SdkProtectedApi static String parseRegionUsingServiceHint(String host, String serviceHint); static String parseRegionFromAfterServiceName(String host, String serviceHint); @Deprecated static String parseServiceName(URI endpoint); static String localHostName(); }
AwsHostNameUtils { public static String parseRegion(String host, String serviceHint) { String result; result = parseRegionFromInternalConfig(host); if (result != null) { return result; } result = parseRegionFromAwsPartitionPattern(host); if (result != null) { return result; } result = parseRegionUsingServiceHint(host, serviceHint); if (result != null) { return result; } result = parseRegionFromAfterServiceName(host, serviceHint); return result; }  @Deprecated static String parseRegionName(URI endpoint); @Deprecated static String parseRegionName(final String host,
                                         final String serviceHint); static String parseRegion(String host, String serviceHint); @SdkProtectedApi static String parseRegionFromInternalConfig(String host); @SdkProtectedApi static String parseRegionFromAwsPartitionPattern(String host); @SdkProtectedApi static String parseRegionUsingServiceHint(String host, String serviceHint); static String parseRegionFromAfterServiceName(String host, String serviceHint); @Deprecated static String parseServiceName(URI endpoint); static String localHostName();  }