aws:orgs
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
aws:orgs [13/12/2024 11:35] – andrew | aws:orgs [11/02/2025 10:35] (current) – andrew | ||
---|---|---|---|
Line 14: | Line 14: | ||
OU_IDs=$(aws organizations describe-organization --query ' | OU_IDs=$(aws organizations describe-organization --query ' | ||
+ | |||
Line 33: | Line 34: | ||
--parent-id $RootId \ | --parent-id $RootId \ | ||
--query ' | --query ' | ||
- | < | + | </code> |
+ | |||
+ | |||
+ | ===== Truncate account number ===== | ||
+ | |||
+ | Sometimes you may want to point to an account, but not reveal the full account number, this code will truncate your account to a specified length. | ||
+ | |||
+ | <code python> | ||
+ | $ cat truncate.py | ||
+ | # | ||
+ | |||
+ | account = ' | ||
+ | removechar = 6 | ||
+ | |||
+ | result1 = account[removechar: | ||
+ | result2 = account[removechar: | ||
+ | print(result1, | ||
+ | |||
+ | $ ./ | ||
+ | 784321 784321 | ||
+ | |||
+ | </code> | ||
aws/orgs.1734089706.txt.gz · Last modified: by andrew