@@ -11,7 +11,9 @@ public class DefaultEndpointProvider implements EndpointResolver {
1111
1212 // 区域代码常量
1313 public static final String REGION_CODE_CN_BEIJING_AUTODRIVING = "cn-beijing-autodriving" ;
14+ public static final String REGION_CODE_AP_SOUTH_EAST_2 = "ap-southeast-2" ;
1415 public static final String REGION_CODE_AP_SOUTH_EAST_3 = "ap-southeast-3" ;
16+ public static final String REGION_CODE_CN_HONGKONG = "cn-hongkong" ;
1517 // 常量
1618 private static final String SEPARATOR = "." ;
1719 private static final String OPEN_PREFIX = "open" ;
@@ -23,10 +25,20 @@ public class DefaultEndpointProvider implements EndpointResolver {
2325
2426 static {
2527 BOOTSTRAP_REGION .add (REGION_CODE_CN_BEIJING_AUTODRIVING );
28+ BOOTSTRAP_REGION .add (REGION_CODE_AP_SOUTH_EAST_2 );
2629 BOOTSTRAP_REGION .add (REGION_CODE_AP_SOUTH_EAST_3 );
2730 }
2831
2932 static {
33+ // --------------------------- iam ---------------------------
34+ DEFAULT_ENDPOINT_MAP .put ("iam" , new ServiceEndpointInfo (
35+ "iam" ,
36+ true ,
37+ "" ,
38+ ENDPOINT ,
39+ createRegionEndpointMap ()
40+ ));
41+
3042 // --------------------------- vke ---------------------------
3143 DEFAULT_ENDPOINT_MAP .put ("vke" , new ServiceEndpointInfo (
3244 "vke" ,
@@ -382,10 +394,12 @@ private static String getDefaultEndpointByServiceInfo(String service, String reg
382394 return resultEndpoint ;
383395 }
384396
385- String regionEndpoint = endpointInfo .regionEndpointMap .get (regionCode );
386- if (regionEndpoint != null ) {
387- resultEndpoint = regionEndpoint ;
388- return resultEndpoint ;
397+ if (endpointInfo .regionEndpointMap != null ) {
398+ String regionEndpoint = endpointInfo .regionEndpointMap .get (regionCode );
399+ if (regionEndpoint != null ) {
400+ resultEndpoint = regionEndpoint ;
401+ return resultEndpoint ;
402+ }
389403 }
390404
391405 resultEndpoint = standardizeDomainServiceCode (service ) + SEPARATOR + regionCode + endpointSuffix ;
0 commit comments