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

Function getSavedQuery

asset/snippets/getSavedQuery.js:26–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24
25 const client = new AssetServiceClient();
26 async function getSavedQuery() {
27 const request = {
28 name: fullQueryName,
29 };
30
31 // Handle the operation using the promise pattern.
32 const [query] = await client.getSavedQuery(request);
33 // Do things with with the response.
34 console.log('Query name:', query.name);
35 console.log('Query description:', query.description);
36 console.log('Created time:', query.createTime);
37 console.log('Updated time:', query.lastUpdateTime);
38 console.log('Query type:', query.content.queryContent);
39 console.log('Query content:', JSON.stringify(query.content, null, 4));
40 }
41 await getSavedQuery();
42 // [END asset_quickstart_get_saved_query]
43}

Callers 2

mainFunction · 0.85
savedQuery.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected