Skip to content

Commit

Permalink
samples: Update asset lib to v1 for ListAssets sample code (#505)
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin E. Coe <bencoe@google.com>
  • Loading branch information
peter-zheng-g and bcoe authored Jun 21, 2021
1 parent 8e9b59c commit 39537d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions asset/snippets/listAssets.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
async function main(assetTypes) {
// [START asset_quickstart_list_assets]
const util = require('util');
const {v1p5beta1} = require('@google-cloud/asset');
const client = new v1p5beta1.AssetServiceClient();
const {v1} = require('@google-cloud/asset');
const client = new v1.AssetServiceClient();

const projectId = await client.getProjectId();
const projectResource = `projects/${projectId}`;
Expand All @@ -43,7 +43,7 @@ async function main(assetTypes) {
// readTime: { seconds: 1593988758 },
};

// Call cloud.assets.v1p5beta1.ListAssets API.
// Call cloud.assets.v1.ListAssets API.
const result = await client.listAssets(request);
// Handle the response.
console.log(util.inspect(result, {depth: null}));
Expand Down

0 comments on commit 39537d3

Please sign in to comment.