Skip to content

Commit

Permalink
修复印度区域关闭问题
Browse files Browse the repository at this point in the history
  • Loading branch information
libaibaia committed Aug 12, 2024
1 parent a226c08 commit 4b847c8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/com/common/aliyun/Base.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

public class Base {

Expand Down Expand Up @@ -42,7 +43,9 @@ DescribeRegionsResponseBodyRegionsRegion> getRegionInfo(Key key, String endPoint
RuntimeOptions runtime = new RuntimeOptions();
Client client = Base.createClient(key, endPoint);
DescribeRegionsResponse response = client.describeRegionsWithOptions(describeRegionsRequest, runtime);
return new ArrayList<>(response.getBody().getRegions().getRegion());
List<DescribeRegionsResponseBody.DescribeRegionsResponseBodyRegionsRegion> region = response.getBody().getRegions().getRegion();
List<DescribeRegionsResponseBody.DescribeRegionsResponseBodyRegionsRegion> collect = region.stream().filter(r -> !r.regionId.contains("ap-south-1")).collect(Collectors.toList());
return new ArrayList<>(collect);
}

}

0 comments on commit 4b847c8

Please sign in to comment.