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

Function main

asset/snippets/deleteFeed.js:22–41  ·  view source on GitHub ↗
(feedName)

Source from the content-addressed store, hash-verified

20// usage: node deleteFeed "project/<PROJECT_NUMBER>/feeds/<FEED_ID>"
21
22async function main(feedName) {
23 // [START asset_quickstart_delete_feed]
24 const util = require('util');
25 const {AssetServiceClient} = require('@google-cloud/asset');
26
27 const client = new AssetServiceClient();
28
29 async function deleteFeed() {
30 const request = {
31 name: feedName,
32 };
33
34 // Handle the operation using the promise pattern.
35 const result = await client.deleteFeed(request);
36 // Do things with with the response.
37 console.log(util.inspect(result, {depth: null}));
38 // [END asset_quickstart_delete_feed]
39 }
40 deleteFeed();
41}
42
43main(...process.argv.slice(2)).catch(err => {
44 console.error(err.message);

Callers 1

deleteFeed.jsFile · 0.70

Calls 1

deleteFeedFunction · 0.85

Tested by

no test coverage detected