Skip to content

Commit e2839b5

Browse files
samples: Update asset lib to v1 for ListAssets sample code (#204)
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 24f6073 commit e2839b5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

asset/snippets/snippets/quickstart_listassets.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
def list_assets(project_id, asset_types, page_size):
2222
# [START asset_quickstart_list_assets]
23-
from google.cloud import asset_v1p5beta1
23+
from google.cloud import asset_v1
2424

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

3131
project_resource = "projects/{}".format(project_id)
32-
content_type = asset_v1p5beta1.ContentType.RESOURCE
33-
client = asset_v1p5beta1.AssetServiceClient()
32+
content_type = asset_v1.ContentType.RESOURCE
33+
client = asset_v1.AssetServiceClient()
3434

35-
# Call ListAssets v1p5beta1 to list assets.
35+
# Call ListAssets v1 to list assets.
3636
response = client.list_assets(
3737
request={
3838
"parent": project_resource,

0 commit comments

Comments
 (0)