aws:orgs
This is an old revision of the document!
Organisations
Get a list of OU's in an organisation
#!/bin/bash # Get the root of an Org and find the subordinate OUs in it. ROOT_ID=$(aws organizations list-roots | jq -r .Roots.[0].Id) printf "Root ID:- ${ROOT_ID}\n" OUS=$(aws organizations list-organizational-units-for-parent --parent-id "${ROOT_ID}" | jq -c .OrganizationalUnits.[].Id) printf "OUs:- ${OUS}\n\n"
aws/orgs.1733824500.txt.gz · Last modified: by andrew