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/deleteBucketPolicy.js

22 lines
562 B

4 weeks ago
const { checkBucketName: _checkBucketName } = require('../utils/checkBucketName');
const proto = exports;
/**
* deleteBucketPolicy
* @param {String} bucketName - bucket name
* @param {Object} options
*/
proto.deleteBucketPolicy = async function deleteBucketPolicy(bucketName, options = {}) {
_checkBucketName(bucketName);
const params = this._bucketRequestParams('DELETE', bucketName, 'policy', options);
params.successStatuses = [204];
const result = await this.request(params);
return {
status: result.status,
res: result.res
};
};