Skip to content

Commit

Permalink
fix(compute): Updated max_results to 100 to avoid too many API calls (#…
Browse files Browse the repository at this point in the history
…108)

Based on @amanda-tarafa comment in C# sample (https://github.com/GoogleCloudPlatform/dotnet-docs-samples/pull/1445/files#r687921807) I am changing the max_results value to 100
  • Loading branch information
rsamborski authored and dandhlee committed Nov 16, 2022
1 parent 6403ab5 commit b459b6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compute/compute/snippets/sample_pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def print_images_list(project: str) -> None:
"""
images_client = compute_v1.ImagesClient()
# Listing only non-deprecated images to reduce the size of the reply.
images_list_request = compute_v1.ListImagesRequest(project=project, max_results=3,
images_list_request = compute_v1.ListImagesRequest(project=project, max_results=100,
filter="deprecated.state != DEPRECATED")

# Although the `max_results` parameter is specified in the request, the iterable returned
Expand Down

0 comments on commit b459b6a

Please sign in to comment.