(bucket, cb)
| 60 | } |
| 61 | |
| 62 | function putObjectLockConfiguration(bucket, cb) { |
| 63 | return s3Client.send(new PutObjectLockConfigurationCommand({ |
| 64 | Bucket: bucket, |
| 65 | ObjectLockConfiguration: { |
| 66 | ObjectLockEnabled: 'Enabled', |
| 67 | Rule: { |
| 68 | DefaultRetention: { |
| 69 | Mode: 'GOVERNANCE', |
| 70 | Days: 1, |
| 71 | }, |
| 72 | }, |
| 73 | }, |
| 74 | })) |
| 75 | .then(data => cb(null, data)) |
| 76 | .catch(cb); |
| 77 | } |
| 78 | |
| 79 | function deleteBucket(bucket, cb) { |
| 80 | return s3Client.send(new DeleteBucketCommand({ Bucket: bucket })) |