sym.sdk.integrations.aws_sso.list_accounts¶
- sym.sdk.integrations.aws_sso.list_accounts(organizational_unit_id: Optional[str] = None) List[dict] ¶
Returns a list of AWS accounts within the AWS SSO Organization that the AWS SSO Sym Integration is connected to, optionally filtered to the specified Organizational Unit.
The behavior of this function changes based on whether the
organizational_unit_id
parameter is specified, and if so what value is provided.If unspecified or set to
None
, this function will return all AWS accounts within your Organization.If a parent root ID (beginning with
r-
) is specified, this function will return all AWS accounts not mapped to any Organizational Unit.If an Organizational Unit ID (any other value) is specified, this function will return all AWS accounts mapped to that Organizational Unit only; accounts in child OUs of the specified OU will not be included.
- Parameters
organizational_unit_id – The ID of the parent root or Organizational Unit to filter by, or
None
to include all AWS accounts.- Returns
A list of dictionaries, with each dictionary representing an AWS account. The dictionaries follow the AWS Account object structure; see here for details.
- Raises
AWSSSOError – If the specified
organizational_unit_id
is invalid or does not exist, if and only iforganizational_unit_id
is specified.