()
| 37 | const storage = new Storage(); |
| 38 | |
| 39 | async function printBucketAcl() { |
| 40 | try { |
| 41 | // Gets the ACL for the bucket |
| 42 | const [acls] = await storage.bucket(bucketName).acl.get(); |
| 43 | |
| 44 | acls.forEach(acl => { |
| 45 | console.log(`${acl.role}: ${acl.entity}`); |
| 46 | }); |
| 47 | } catch (error) { |
| 48 | console.error( |
| 49 | 'Error executing print bucket ACL:', |
| 50 | error.message || error |
| 51 | ); |
| 52 | } |
| 53 | } |
| 54 | printBucketAcl(); |
| 55 | // [END storage_print_bucket_acl] |
| 56 | } |