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

Function callCreateFolder

storage-control/createFolder.js:35–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33 const controlClient = new StorageControlClient();
34
35 async function callCreateFolder() {
36 const bucketPath = controlClient.bucketPath('_', bucketName);
37
38 // Create the request
39 const request = {
40 parent: bucketPath,
41 folderId: folderName,
42 };
43
44 // Run request
45 const [response] = await controlClient.createFolder(request);
46 console.log(`Created folder: ${response.name}.`);
47 }
48
49 callCreateFolder();
50 // [END storage_control_create_folder]

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected