MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / getServiceAccount

Function getServiceAccount

storage/getServiceAccount.js:38–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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]

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected