User Tools

Site Tools


aws:orgs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
aws:orgs [13/12/2024 11:35] andrewaws:orgs [11/02/2025 10:35] (current) andrew
Line 14: Line 14:
  
   OU_IDs=$(aws organizations describe-organization --query 'Organization.Id' --output text)     OU_IDs=$(aws organizations describe-organization --query 'Organization.Id' --output text)  
 +
  
  
Line 33: Line 34:
     --parent-id $RootId \     --parent-id $RootId \
     --query 'OrganizationalUnits[?Name==`SpecificOU`].Id' --output text )     --query 'OrganizationalUnits[?Name==`SpecificOU`].Id' --output text )
-<code>+</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 
 +#!/usr/bin/python3 
 + 
 +account = '123456784321' 
 +removechar = 6 
 + 
 +result1 = account[removechar:
 +result2 = account[removechar:len(account)] 
 +print(result1, result2) 
 + 
 +$ ./truncate.py 
 +784321 784321 
 + 
 +</code>
  
  
  
  
aws/orgs.1734089706.txt.gz · Last modified: by andrew

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki