Skip to content

Commit

Permalink
adding list_policies_single_page for orgs
Browse files Browse the repository at this point in the history
  • Loading branch information
eamonnfaherty committed Oct 26, 2020
1 parent 709f2b3 commit b27243e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions betterboto/organizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,24 @@ def list_children_single_page(self, **kwargs):
)


def list_policies_single_page(self, **kwargs):
"""
This will continue to call list_policies until there are no more pages left to retrieve. It will return
the aggregated response in the same structure as list_policies does.
:param self: organizations client
:param kwargs: these are passed onto the list_policies method call
:return: organizations_client.list_policies.response
"""
return slurp(
'list_policies',
self.list_policies,
'Policies',
'NextToken', 'NextToken',
**kwargs
)


def list_organizational_units_for_parent_single_page(self, **kwargs):
"""
This will continue to call list_organizational_units_for_parent until there are no more pages left to retrieve.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setuptools.setup(
name="better-boto",
version="0.32.0",
version="0.33.0",
author="Eamonn Faherty",
author_email="python-packages@designandsolve.co.uk",
description="Helpers to make using boto3 more enjoyable",
Expand Down

0 comments on commit b27243e

Please sign in to comment.