deleteBucketInventory.ts 658 B

123456789101112131415161718192021
  1. import { checkBucketName } from '../utils/checkBucketName';
  2. /**
  3. * deleteBucketInventory
  4. * @param {String} bucketName - bucket name
  5. * @param {String} inventoryId
  6. * @param {Object} options
  7. */
  8. export async function deleteBucketInventory(this: any, bucketName: string, inventoryId: string, options: any = {}) {
  9. const subres: any = Object.assign({ inventory: '', inventoryId }, options.subres);
  10. checkBucketName(bucketName);
  11. const params = this._bucketRequestParams('DELETE', bucketName, subres, options);
  12. params.successStatuses = [204];
  13. const result = await this.request(params);
  14. return {
  15. status: result.status,
  16. res: result.res
  17. };
  18. }