AnalogJ / lexicon

Manipulate DNS records on various DNS providers in a standardized way.
MIT License
1.48k stars 304 forks source link

List UltraDNS records being limited #646

Open johntt183 opened 3 years ago

johntt183 commented 3 years ago

When trying to query records in UltraDNS I am seeing the below in the debug log

"queryInfo":{"sort":"OWNER","reverse":false,"limit":100},"resultInfo":{"totalCount":220,"offset":0,"returnedCount":100}}

From the UltraDNS API docs

List all RRSets in a Zone
This call provides a list of all RRSets in a zone, or if specific query parameters are used, a list of the RRSets in a zone that match the provided criteria.
The {zoneName} identified in the call should be the name of the domain whose RR sets you want to return.
Method and URI: GET https://api.ultradns.com/zones/{zoneName}/rrsets
Parameters: The following parameters are available to be sent with the call.
...

limit | The maximum number of rows requested. Default is 100.

I've looked at https://github.com/AnalogJ/lexicon/blob/master/lexicon/providers/ultradns.py but couldn't see any limit options

adferrand commented 3 years ago

Here it would make sense to keep the 100 rows limit (to avoid to request too much records at a time), but use the pagination returned by UltraDNS to continue the queries until all records have been retrieved. What do you think of this approach?