Skip to content

Commit

Permalink
adding list_delegated_services_for_account_single_page
Browse files Browse the repository at this point in the history
  • Loading branch information
eamonnfaherty committed Jun 10, 2021
1 parent 8fc2dee commit 71d31af
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 @@ -169,6 +169,24 @@ def list_delegated_administrators_single_page(self, **kwargs):
)


def list_delegated_services_for_account_single_page(self, **kwargs):
"""
This will continue to call list_delegated_services_for_account until there are no more pages left to retrieve.
It will return the aggregated response in the same structure as list_delegated_services_for_account does.
:param self: organizations client
:param kwargs: these are passed onto the list_delegated_services_for_account method call
:return: organizations_client.list_delegated_services_for_account.response
"""
return slurp(
'list_delegated_services_for_account',
self.list_delegated_services_for_account,
'DelegatedServices',
'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 @@ -278,5 +296,6 @@ def make_better(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_delegated_services_for_account_single_page = types.MethodType(list_delegated_services_for_account_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.37.0",
version="0.38.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 71d31af

Please sign in to comment.