org_unit#

Organizational unit related boto3 API enhancement.

This module provides helper functions for interacting with AWS Organizations API, with focus on organizational units, parent-child relationships, and account management. Includes pagination handling and type-safe iterators.

aws_organizations.better_boto.org_unit.list_parents(bsm: BotoSesManager, child_id: str, page_size: int = 20, max_results: int = 1000) ParentIterproxy[source]#

List all parents of a child entity with pagination support.

aws_organizations.better_boto.org_unit.list_children(bsm: BotoSesManager, parent_id: str, child_type: str, page_size: int = 20, max_results: int = 1000) ChildIterproxy[source]#

List all children of a parent entity with pagination support.

aws_organizations.better_boto.org_unit.get_root_id(bsm: BotoSesManager, aws_account_id: str) str[source]#

Recursively going up to find the AWS Organizations root id.

Parameters:
  • bsm – Boto session manager instance

  • aws_account_id – AWS account ID to start traversal from

Returns:

Root organization ID

aws_organizations.better_boto.org_unit.list_organizational_units_for_parent(bsm: BotoSesManager, parent_id: str, page_size: int = 20, max_results: int = 1000) OrganizationUnitIterproxy[source]#

List all organizational units under a parent with pagination support.

aws_organizations.better_boto.org_unit.list_accounts_for_parent(bsm: BotoSesManager, parent_id: str, page_size: int = 20, max_results: int = 1000) AccountIterproxy[source]#

List all accounts under a parent with pagination support.