Skip to content

Commit

Permalink
samples: Update asset lib to v1 for ListAssets sample code (#204)
Browse files Browse the repository at this point in the history
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
  • Loading branch information
peter-zheng-g and parthea committed Jun 21, 2021
1 parent 321009f commit e6c898b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

def list_assets(project_id, asset_types, page_size):
# [START asset_quickstart_list_assets]
from google.cloud import asset_v1p5beta1
from google.cloud import asset_v1

# TODO project_id = 'Your Google Cloud Project ID'
# TODO asset_types = 'Your asset type list, e.g.,
Expand All @@ -29,10 +29,10 @@ def list_assets(project_id, asset_types, page_size):
# 1000 (both inclusively)'

project_resource = "projects/{}".format(project_id)
content_type = asset_v1p5beta1.ContentType.RESOURCE
client = asset_v1p5beta1.AssetServiceClient()
content_type = asset_v1.ContentType.RESOURCE
client = asset_v1.AssetServiceClient()

# Call ListAssets v1p5beta1 to list assets.
# Call ListAssets v1 to list assets.
response = client.list_assets(
request={
"parent": project_resource,
Expand Down

0 comments on commit e6c898b

Please sign in to comment.