Skip to content

Commit

Permalink
add BucketEncryption APIS
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonxu committed Mar 4, 2021
1 parent a16493c commit bbf407f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
26 changes: 13 additions & 13 deletions demo/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -858,19 +858,19 @@ function listBucketInventory() {
}

function putBucketEncryption() {
cos.putBucketEncryption({
Bucket: config.Bucket,
Region: config.Region,
ServerSideEncryptionConfiguration: {
Rule: [{
ApplySideEncryptionConfiguration: {
SSEAlgorithm: 'AES256',
},
}],
},
}, function(err, data) {
logger.log(err || JSON.stringify(data));
});
cos.putBucketEncryption({
Bucket: config.Bucket,
Region: config.Region,
ServerSideEncryptionConfiguration: {
Rule: [{
ApplySideEncryptionConfiguration: {
SSEAlgorithm: 'AES256',
},
}],
},
}, function(err, data) {
logger.log(err || JSON.stringify(data));
});
}

function getBucketEncryption() {
Expand Down
1 change: 0 additions & 1 deletion src/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -1670,7 +1670,6 @@ function getBucketAccelerate(params, callback) {
});
}


function putBucketEncryption(params, callback) {
var conf = params.ServerSideEncryptionConfiguration || {};
var Rules = conf.Rule || conf.Rules || [];
Expand Down

0 comments on commit bbf407f

Please sign in to comment.