最近更新时间:2021-09-18
以下代码用于获取桶的地域(称为Region或Location):
public void testGetBucketLocation() { try{ String location = s3.getBucketLocation(bucketName); System.out.println("Bucket location : " + location); } catch (AmazonServiceException e) { System.err.println(e.getErrorMessage()); } } |