()
| 36 | }); |
| 37 | |
| 38 | async function getServiceAccount() { |
| 39 | try { |
| 40 | const [serviceAccount] = await storage.getServiceAccount(); |
| 41 | console.log( |
| 42 | `The GCS service account for project ${projectId} is: ${serviceAccount.emailAddress}` |
| 43 | ); |
| 44 | } catch (error) { |
| 45 | console.error( |
| 46 | 'Error executing get service account:', |
| 47 | error.message || error |
| 48 | ); |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | getServiceAccount(); |
| 53 | // [END storage_get_service_account] |