Skip to content

Commit a308ef5

Browse files
authored
fix(compute): Updated max_results to 100 to avoid too many API calls (#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
1 parent 84664d4 commit a308ef5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compute/compute/snippets/sample_pagination.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def print_images_list(project: str) -> None:
3434
"""
3535
images_client = compute_v1.ImagesClient()
3636
# Listing only non-deprecated images to reduce the size of the reply.
37-
images_list_request = compute_v1.ListImagesRequest(project=project, max_results=3,
37+
images_list_request = compute_v1.ListImagesRequest(project=project, max_results=100,
3838
filter="deprecated.state != DEPRECATED")
3939

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

0 commit comments

Comments
 (0)