微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

com.amazonaws.services.s3.model.SetBucketTaggingConfigurationRequest的实例源码

项目:ibm-cos-sdk-java    文件AmazonS3Client.java   
@Override
public void setBucketTaggingConfiguration(
        SetBucketTaggingConfigurationRequest setBucketTaggingConfigurationRequest) {
    setBucketTaggingConfigurationRequest = beforeClientExecution(setBucketTaggingConfigurationRequest);
    rejectNull(setBucketTaggingConfigurationRequest,"The set bucket tagging configuration request object must be specified.");

    String bucketName = setBucketTaggingConfigurationRequest.getBucketName();
    BucketTaggingConfiguration bucketTaggingConfiguration = setBucketTaggingConfigurationRequest.getTaggingConfiguration();

    rejectNull(bucketName,"The bucket name parameter must be specified when setting bucket tagging configuration.");
    rejectNull(bucketTaggingConfiguration,"The tagging configuration parameter must be specified when setting bucket tagging configuration.");

    Request<SetBucketTaggingConfigurationRequest> request = createRequest(bucketName,null,setBucketTaggingConfigurationRequest,HttpMethodName.PUT);
    request.addParameter("tagging",null);

    byte[] content = new BucketConfigurationXmlFactory().convertToXmlByteArray(bucketTaggingConfiguration);
    request.addHeader("Content-Length",String.valueOf(content.length));
    request.addHeader("Content-Type","application/xml");
    request.setContent(new ByteArrayInputStream(content));
    try {
        byte[] md5 = Md5Utils.computeMD5Hash(content);
        String md5Base64 = BinaryUtils.toBase64(md5);
        request.addHeader("Content-MD5",md5Base64);
    } catch ( Exception e ) {
        throw new SdkClientException("Couldn't compute md5 sum",e);
    }

    invoke(request,voidResponseHandler,bucketName,null);
}
项目:elasticsearch_my    文件AmazonS3Wrapper.java   
@Override
public void setBucketTaggingConfiguration(SetBucketTaggingConfigurationRequest setBucketTaggingConfigurationRequest) {
    delegate.setBucketTaggingConfiguration(setBucketTaggingConfigurationRequest);
}
项目:ibm-cos-sdk-java    文件AmazonS3Client.java   
@Override
public void setBucketTaggingConfiguration(String bucketName,BucketTaggingConfiguration bucketTaggingConfiguration) {
    setBucketTaggingConfiguration(new SetBucketTaggingConfigurationRequest(bucketName,bucketTaggingConfiguration));
}
项目:S3Decorators    文件S3Decorator.java   
@Override
public void setBucketTaggingConfiguration(SetBucketTaggingConfigurationRequest setBucketTaggingConfigurationRequest) {
  run(() -> getDelegate().setBucketTaggingConfiguration(setBucketTaggingConfigurationRequest));
}
项目:presto    文件MockAmazonS3.java   
@Override
public void setBucketTaggingConfiguration(SetBucketTaggingConfigurationRequest setBucketTaggingConfigurationRequest)
{
}
项目:Scribengin    文件AmazonS3Mock.java   
@Override
public void setBucketTaggingConfiguration(SetBucketTaggingConfigurationRequest setBucketTaggingConfigurationRequest) {
  // Todo Auto-generated method stub

}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。