aws:orgs
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
aws:orgs [11/02/2025 10:31] – [Get a list of OU's in an organisation] andrew | aws:orgs [11/02/2025 10:35] (current) – andrew | ||
---|---|---|---|
Line 34: | Line 34: | ||
--parent-id $RootId \ | --parent-id $RootId \ | ||
--query ' | --query ' | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== 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 | ||
+ | |||
</ | </ | ||
aws/orgs.1739269885.txt.gz · Last modified: by andrew