You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
parttimejob/node_modules/ali-oss/lib/common/bucket/getBucketEncryption.js

22 lines
628 B

1 month ago
const { checkBucketName: _checkBucketName } = require('../utils/checkBucketName');
const proto = exports;
/**
* getBucketEncryption
* @param {String} bucketName - bucket name
*/
proto.getBucketEncryption = async function getBucketEncryption(bucketName) {
_checkBucketName(bucketName);
const params = this._bucketRequestParams('GET', bucketName, 'encryption');
params.successStatuses = [200];
params.xmlResponse = true;
const result = await this.request(params);
const encryption = result.data.ApplyServerSideEncryptionByDefault;
return {
encryption,
status: result.status,
res: result.res
};
};