Skip to content

Commit b459b6a

Browse files
rsamborskidandhlee
authored andcommitted
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 6403ab5 commit b459b6a

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)