Skip to content

Commit

Permalink
adding list_delegated_administrators_single_page
Browse files Browse the repository at this point in the history
  • Loading branch information
eamonnfaherty committed Jun 10, 2021
1 parent 785ae53 commit 8fc2dee
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions betterboto/organizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,24 @@ def list_parents_single_page(self, **kwargs):
)


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


def list_children_nested(self, **kwargs):
"""
This method will return a list of all children (either ACCOUNT or ORGANIZATIONAL_UNIT) for the given ParentId. It
Expand Down Expand Up @@ -259,5 +277,6 @@ def make_better(client):
client.list_organizational_units_for_parent_single_page = types.MethodType(list_organizational_units_for_parent_single_page, client)
client.list_roots_single_page = types.MethodType(list_roots_single_page, client)
client.list_parents_single_page = types.MethodType(list_parents_single_page, client)
client.list_delegated_administrators_single_page = types.MethodType(list_delegated_administrators_single_page, client)
client.list_targets_for_policy_single_page = types.MethodType(list_targets_for_policy_single_page, client)
return client
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.36.0",
version="0.37.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 8fc2dee

Please sign in to comment.