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_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