From 691e38e19d2c5dc7223e35b681c17b1194302e1b Mon Sep 17 00:00:00 2001 From: Remigiusz Samborski Date: Fri, 20 Aug 2021 15:54:22 +0200 Subject: [PATCH] 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 --- samples/snippets/sample_pagination.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/sample_pagination.py b/samples/snippets/sample_pagination.py index 378d0512d..2782a3c3a 100644 --- a/samples/snippets/sample_pagination.py +++ b/samples/snippets/sample_pagination.py @@ -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