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

Function createBucket

storage/quickstart.js:37–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35 // const bucketName = 'your-unique-bucket-name';
36
37 async function createBucket() {
38 try {
39 // Creates the new bucket
40 await storage.createBucket(bucketName);
41 console.log(`Bucket ${bucketName} created.`);
42 } catch (error) {
43 console.error('Error executing create bucket:', error.message || error);
44 }
45 }
46
47 createBucket();
48 // [END storage_quickstart]

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected