本文整理了Java中com.amazonaws.regions.Region.getAvailableEndpoints
方法的一些代码示例,展示了Region.getAvailableEndpoints
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Region.getAvailableEndpoints
方法的具体详情如下:
包路径:com.amazonaws.regions.Region
类名称:Region
方法名:getAvailableEndpoints
[英]Returns a immutable collection of all endpoints available in the metadata.
[中]返回元数据中所有可用端点的不可变集合。
代码示例来源:origin: aws/aws-sdk-java
@Override
public Region getRegionByEndpoint(String endpoint) {
String host = getHost(endpoint);
for (Region region : getRegions()) {
for (String serviceEndpoint :
region.getAvailableEndpoints()) {
if (host.equals(getHost(serviceEndpoint))) {
return region;
}
}
}
throw new IllegalArgumentException(
"No region found with any service for endpoint " + endpoint);
}
代码示例来源:origin: com.amazonaws/aws-java-sdk-core
@Override
public Region getRegionByEndpoint(String endpoint) {
String host = getHost(endpoint);
for (Region region : getRegions()) {
for (String serviceEndpoint :
region.getAvailableEndpoints()) {
if (host.equals(getHost(serviceEndpoint))) {
return region;
}
}
}
throw new IllegalArgumentException(
"No region found with any service for endpoint " + endpoint);
}
代码示例来源:origin: Nextdoor/bender
@Override
public Region getRegionByEndpoint(String endpoint) {
String host = getHost(endpoint);
for (Region region : getRegions()) {
for (String serviceEndpoint :
region.getAvailableEndpoints()) {
if (host.equals(getHost(serviceEndpoint))) {
return region;
}
}
}
throw new IllegalArgumentException(
"No region found with any service for endpoint " + endpoint);
}
内容来源于网络,如有侵权,请联系作者删除!