Organizations helpers

What is this?

The following methods are added to clients instantiated using Betterboto:

Methods

betterboto.organizations.convert_path_to_ou(self, path)[source]

This method accepts a path and returns the ou. This raises an exception when converting / and you have more than one root

Parameters
  • self – organizations client

  • path – organizations path

Returns

the ou of the path specified

betterboto.organizations.list_accepted_portfolio_shares_single_page(self, **kwargs)[source]

This will continue to call list_accepted_portfolio_shares until there are no more pages left to retrieve. It will return the aggregated response in the same structure as list_accepted_portfolio_shares does.

Parameters
  • self – organizations client

  • kwargs – these are passed onto the list_accepted_portfolio_shares method call

Returns

organizations_client.list_accepted_portfolio_shares.response

betterboto.organizations.list_accounts_single_page(self, **kwargs)[source]

This will continue to call list_accounts until there are no more pages left to retrieve. It will return the aggregated response in the same structure as list_accounts does.

Parameters
  • self – organizations client

  • kwargs – these are passed onto the list_accounts method call

Returns

organizations_client.list_accounts.response

betterboto.organizations.list_children_nested(self, **kwargs)[source]

This method will return a list of all children (either ACCOUNT or ORGANIZATIONAL_UNIT) for the given ParentId. It includes children, grandchildren lower levels of nesting.

Parameters
  • self – organizations client

  • kwargs – these are passed onto the list_children method call

Returns

list of children in the structure of [{‘Id’: “0123456789010”}, {‘Id’: “1009876543210”}]

betterboto.organizations.list_children_single_page(self, **kwargs)[source]

This will continue to call list_children until there are no more pages left to retrieve. It will return the aggregated response in the same structure as list_children does.

Parameters
  • self – organizations client

  • kwargs – these are passed onto the list_children method call

Returns

organizations_client.list_children.response

betterboto.organizations.list_organizational_units_for_parent_single_page(self, **kwargs)[source]

This will continue to call list_organizational_units_for_parent until there are no more pages left to retrieve. It will return the aggregated response in the same structure as list_organizational_units_for_parent does.

Parameters
  • self – organizations client

  • kwargs – these are passed onto the list_organizational_units_for_parent method call

Returns

organizations_client.list_organizational_units_for_parent.response

betterboto.organizations.list_parents_single_page(self, **kwargs)[source]

This will continue to call list_parents until there are no more pages left to retrieve. It will return the aggregated response in the same structure as list_parents does.

Parameters
  • self – organizations client

  • kwargs – these are passed onto the list_parents method call

Returns

organizations_client.list_parents.response

betterboto.organizations.search_products_as_admin_single_page(self, **kwargs)[source]

This will continue to call search_products_as_admin until there are no more pages left to retrieve. It will return the aggregated response in the same structure as search_products_as_admin does.

Parameters
  • self – organizations client

  • kwargs – these are passed onto the search_products_as_admin method call

Returns

organizations_client.search_products_as_admin.response