本文整理了Java中com.amazonaws.services.s3.model.Region.equals
方法的一些代码示例,展示了Region.equals
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Region.equals
方法的具体详情如下:
包路径:com.amazonaws.services.s3.model.Region
类名称:Region
方法名:equals
暂无
代码示例来源:origin: aimmac23/selenium-video-node
@Override
public Map<String, Object> additionalInformation() {
// AWS S3 endpoint for US standard does not have the region identifier
// in it for legacy reasons. All other regions contain the identifier in the URI.
// Examples:
// 1. eu-west-1
// https://s3-eu-west-1.amazonaws.com/<bucketName>/<key>
// 2. us-east-1 (default)
// https://<bucketName>.amazonaws.com/<key>
String endpointUri = String.format("https://%s.s3.amazonaws.com/%s", bucketName, videoFileName);
if (!s3Region.equals(Region.US_Standard)) {
endpointUri = String.format("https://s3-%s.amazonaws.com/%s/%s", s3Region, bucketName, videoFileName);
}
return new HashMap<String, Object>(Collections.singletonMap("path", endpointUri));
}
}
代码示例来源:origin: HotelsDotCom/circus-train
private String regionForUri(AmazonS3 client, AmazonS3URI uri) {
String bucketRegion = client.getBucketLocation(uri.getBucket());
Region region = Region.fromValue(bucketRegion);
// S3 doesn't have a US East 1 region, US East 1 is really the region
// US Standard. US Standard places the data in either an east coast
// or west coast data center geographically closest to you.
// SigV4 requires you to mention a region while signing a request
// and for the S3's US standard endpoints the value to be used is "us-east-1"
// US West 1 has an endpoint and so is treated as a stand alone region,
// US East 1 doesn't and so is bundled into US Standard
if (region.equals(Region.US_Standard)) {
bucketRegion = "us-east-1";
} else {
bucketRegion = region.toString();
}
return bucketRegion;
}
代码示例来源:origin: com.hotels/circus-train-s3-s3-copier
private String regionForUri(AmazonS3 client, AmazonS3URI uri) {
String bucketRegion = client.getBucketLocation(uri.getBucket());
Region region = Region.fromValue(bucketRegion);
// S3 doesn't have a US East 1 region, US East 1 is really the region
// US Standard. US Standard places the data in either an east coast
// or west coast data center geographically closest to you.
// SigV4 requires you to mention a region while signing a request
// and for the S3's US standard endpoints the value to be used is "us-east-1"
// US West 1 has an endpoint and so is treated as a stand alone region,
// US East 1 doesn't and so is bundled into US Standard
if (region.equals(Region.US_Standard)) {
bucketRegion = "us-east-1";
} else {
bucketRegion = region.toString();
}
return bucketRegion;
}
内容来源于网络,如有侵权,请联系作者删除!