boto_utils¶
- lakeformation.boto_utils.list_recursively(method: Callable, default_kwargs: dict, next_token_arg_name: str, next_token_value_field: str, collection_value_field: str)[source]¶
Given an paginator API like this:
response = client.get_databases( CatalogId='string', NextToken='string', MaxResults=123, ResourceShareType='FOREIGN'|'ALL' )
Response schema like this:
{ 'DatabaseList': [ {}, {}, ... ], 'NextToken': 'string' }
This api will retrieve the database list recursively in one api call:
list_recursively( method=client.get_database, default_kwargs=dict( CatalogId="111122223333", MaxResults=1, ResourceShareType="ALL", ), next_token_arg_name="NextToken", next_token_value_field="NextToken", collection_value_field="DatabaseList", )
- Parameters
method –
default_kwargs –
next_token_arg_name –
next_token_value_field –
collection_value_field –
- Returns