删除桶策略
您可以使用 deleteBucketPolicy 接口删除桶策略。以下代码展示如何删除一个桶的策略:
String bucketName = "<your-bucket-name>";
try {
s3.deleteBucketPolicy(bucketName);
} catch (AmazonServiceException e) {
System.err.println(e.getErrorMessage());
}
您可以使用 deleteBucketPolicy 接口删除桶策略。以下代码展示如何删除一个桶的策略:
String bucketName = "<your-bucket-name>";
try {
s3.deleteBucketPolicy(bucketName);
} catch (AmazonServiceException e) {
System.err.println(e.getErrorMessage());
}