Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions asset/cloud-client/quickstart_searchalliampolicies.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ def search_all_iam_policies(scope, query=None, page_size=None):
# [START asset_quickstart_search_all_iam_policies]
from google.cloud import asset_v1

# TODO scope = 'Scope of the search'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these labeled TODO? This is just a description, right, not a future task. Or am I missing something?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm following the style in some of our team's existing samples (e.g., createfeed.py)
Is there a particular style I should use for these commented variables?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, if that's been used before, let's keep it.

# TODO query = 'Query statement'
# TODO page_size = Size of each result page

client = asset_v1.AssetServiceClient()
response = client.search_all_iam_policies(
scope, query=query, page_size=page_size)
Expand Down
6 changes: 6 additions & 0 deletions asset/cloud-client/quickstart_searchallresources.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ def search_all_resources(scope,
# [START asset_quickstart_search_all_resources]
from google.cloud import asset_v1

# TODO scope = 'Scope of the search'
# TODO query = 'Query statement'
# TODO asset_types = 'List of asset types to search for'
# TODO page_size = Size of each result page
# TODO order_by = 'Fields to sort the results'

client = asset_v1.AssetServiceClient()
response = client.search_all_resources(
scope,
Expand Down