mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-22 13:50:09 +00:00
aws: clean up aws_change_access_key function
This commit is contained in:
parent
4f4985fddc
commit
5f893dcd20
1 changed files with 11 additions and 10 deletions
|
@ -15,18 +15,19 @@ function asp {
|
||||||
}
|
}
|
||||||
|
|
||||||
function aws_change_access_key {
|
function aws_change_access_key {
|
||||||
if [[ "x$1" == "x" ]] then
|
if [[ -z "$1" ]] then
|
||||||
echo "usage: $0 <profile.name>"
|
echo "usage: $0 <profile>"
|
||||||
return 1
|
return 1
|
||||||
else
|
|
||||||
echo "Insert the credentials when asked."
|
|
||||||
asp $1
|
|
||||||
aws iam create-access-key
|
|
||||||
aws configure --profile $1
|
|
||||||
echo "You can now safely delete the old access key running 'aws iam delete-access-key --access-key-id ID'"
|
|
||||||
echo "Your current keys are:"
|
|
||||||
aws iam list-access-keys
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo Insert the credentials when asked.
|
||||||
|
asp "$1"
|
||||||
|
aws iam create-access-key
|
||||||
|
aws configure --profile "$1"
|
||||||
|
|
||||||
|
echo You can now safely delete the old access key running \`aws iam delete-access-key --access-key-id ID\`
|
||||||
|
echo Your current keys are:
|
||||||
|
aws iam list-access-keys
|
||||||
}
|
}
|
||||||
|
|
||||||
function aws_profiles {
|
function aws_profiles {
|
||||||
|
|
Loading…
Reference in a new issue