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 <[email protected]>
  • Loading branch information
peter-zheng-g and bcoe authored Jun 21, 2021
1 parent 5c47d0f commit d6824da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/google-cloud-asset/samples/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 d6824da

Please sign in to comment.