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

Function main

media/video-stitcher/deleteVodConfig.js:18–48  ·  view source on GitHub ↗
(projectId, location, vodConfigId)

Source from the content-addressed store, hash-verified

16'use strict';
17
18function main(projectId, location, vodConfigId) {
19 // [START videostitcher_delete_vod_config]
20 /**
21 * TODO(developer): Uncomment these variables before running the sample.
22 */
23 // projectId = 'my-project-id';
24 // location = 'us-central1';
25 // vodConfigId = 'my-vod-config-id';
26
27 // Imports the Video Stitcher library
28 const {VideoStitcherServiceClient} =
29 require('@google-cloud/video-stitcher').v1;
30 // Instantiates a client
31 const stitcherClient = new VideoStitcherServiceClient();
32
33 async function deleteVodConfig() {
34 // Construct request
35 const request = {
36 name: stitcherClient.vodConfigPath(projectId, location, vodConfigId),
37 };
38 const [operation] = await stitcherClient.deleteVodConfig(request);
39 await operation.promise();
40 console.log('Deleted VOD config');
41 }
42
43 deleteVodConfig().catch(err => {
44 console.error(err.message);
45 process.exitCode = 1;
46 });
47 // [END videostitcher_delete_vod_config]
48}
49
50// node deleteVodConfig.js <projectId> <location> <vodConfigId>
51main(...process.argv.slice(2));

Callers 1

deleteVodConfig.jsFile · 0.70

Calls 1

deleteVodConfigFunction · 0.85

Tested by

no test coverage detected