下面列出了怎么用com.amazonaws.services.s3.model.BucketLoggingConfiguration的API类实例代码及写法,或者点击链接到github查看源代码。
/**
* Instantiates a new bucket VH.
*
* @param bucket the bucket
* @param location the location
* @param versionConfig the version config
* @param tags the tags
*/
public BucketVH(Bucket bucket,String location,BucketVersioningConfiguration versionConfig, List<Tag> tags, String bucketEncryp, boolean websiteConfiguration,BucketLoggingConfiguration bucketLoggingConfiguration){
this.bucket = bucket;
this.location = location;
this.versionStatus = versionConfig==null?"":versionConfig.getStatus();
this.mfaDelete = versionConfig==null?null:versionConfig.isMfaDeleteEnabled();
this.tags = tags;
this.bucketEncryp = bucketEncryp;
this.websiteConfiguration = websiteConfiguration;
this.isLoggingEnabled = bucketLoggingConfiguration==null?null:bucketLoggingConfiguration.isLoggingEnabled();
this.destinationBucketName = bucketLoggingConfiguration==null?"":bucketLoggingConfiguration.getDestinationBucketName();
this.logFilePrefix = bucketLoggingConfiguration==null?"":bucketLoggingConfiguration.getLogFilePrefix();
}
@Test
public void testUnknownParameter() throws Exception {
try {
client.setBucketLoggingConfiguration(
new SetBucketLoggingConfigurationRequest(
containerName, new BucketLoggingConfiguration()));
Fail.failBecauseExceptionWasNotThrown(AmazonS3Exception.class);
} catch (AmazonS3Exception e) {
assertThat(e.getErrorCode()).isEqualTo("NotImplemented");
}
}
/** Unsupported Operation. */
@Override public BucketLoggingConfiguration getBucketLoggingConfiguration(
String bucketName) throws SdkClientException {
throw new UnsupportedOperationException("Operation not supported");
}
/** Unsupported Operation. */
@Override public BucketLoggingConfiguration getBucketLoggingConfiguration(
GetBucketLoggingConfigurationRequest getBucketLoggingConfigurationReq) throws SdkClientException {
throw new UnsupportedOperationException("Operation not supported");
}
@Override
public BucketLoggingConfiguration getBucketLoggingConfiguration(String bucketName) throws AmazonClientException,
AmazonServiceException {
// TODO Auto-generated method stub
return null;
}