boto / botocore

The low-level, core functionality of boto3 and the AWS CLI.
Apache License 2.0
1.48k stars 1.08k forks source link

Feature: Paginator For OpenSearch Client #3245

Closed digglife closed 2 weeks ago

digglife commented 2 weeks ago

Describe the feature

Add paginator support for OpenSearch Client.

Use Case

With this feature, we can use paginator for the OpenSearch APIs with Max Results limit, instead of looping with NextToken manually. Something like

instances = []
opensearch = boto3.client('opensearch')
paginator = opensearch.get_paginator('describe_reserved_instances')
for page in paginator.paginate():
    instances.extend(page['ReservedInstances'])

Proposed Solution

Update paginators-1.json of opensearch

Other Information

No response

Acknowledgements

SDK version used

Python SDK Botocore 1.x

Environment details (OS name and version, etc.)

macos

tim-finnigan commented 2 weeks ago

Thanks for the feature request and for creating that PR. Paginator models are owned and maintained upstream by service teams, because they are used across AWS SDKs. Therefore the OpenSearch team would need to release these paginator models directly in order for SDKs like Boto3 to use them.

I have created an internal feature request for that service team to add the paginator models from your PR. I'm going to close this since the feature request won't be tracked here, but please refer to the CHANGELOG for future updates.

github-actions[bot] commented 2 weeks ago

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.