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 Aug 20, 2021
1 parent 84664d4 commit a308ef5
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 a308ef5

Please sign in to comment.