Organizations helpers

What is this?

The following methods are added to clients instantiated using Betterboto:

Methods

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

This method accepts an ou and returns the path from the root account down to the ou

Parameters
  • self – organizations client

  • ou – the account

Returns

the path from the root account down to the ou

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