hexo/node_modules/ali-oss/lib/common/bucket/getBucketStat.js

18 lines
605 B
JavaScript
Raw Normal View History

2023-09-25 15:58:56 +08:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getBucketStat = void 0;
const checkBucketName_1 = require("../utils/checkBucketName");
async function getBucketStat(name, options) {
name = name || this.options.bucket;
checkBucketName_1.checkBucketName(name);
const params = this._bucketRequestParams('GET', name, 'stat', options);
params.successStatuses = [200];
params.xmlResponse = true;
const result = await this.request(params);
return {
res: result.res,
stat: result.data
};
}
exports.getBucketStat = getBucketStat;