Skip to content

Instantly share code, notes, and snippets.

@edyesed
Created August 3, 2018 05:14
Show Gist options
  • Save edyesed/eabaa9a9b4761a9563a016ad71421ab0 to your computer and use it in GitHub Desktop.
Save edyesed/eabaa9a9b4761a9563a016ad71421ab0 to your computer and use it in GitHub Desktop.
Get IAM List,Get,Describe actions
# The IAM User guide is in a GH repo now, clone that.
git clone [email protected]:awsdocs/iam-user-guide.git
# get into the directory where the files are located
cd iam-user-guide/doc_source/
# The permissions pages begin with list_*.md
# Read those puppies
grep 'service prefix:' list_*md | while read rline; do
FILEN=`echo ${rline} | awk -F: {'print $1'}`
PREFIX=$(echo ${rline} | sed -e 's/^.*service\ prefix...\([^\`]*\)\`.*$/\1/')
echo "# ${PREFIX}"
awk '{ if ( $0 ~ / (Get[A-Z]|List[A-Z]|Describe[A-Z])/ ) { print "'${PREFIX}':"$3 }}' ${FILEN};
echo "###";
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment