Reputation: 3
This command "aws iam get-account-password-policy" gives a output in the JSON Format.
{
"PasswordPolicy": {
"MinimumPasswordLength": 15,
"RequireSymbols": false,
"RequireNumbers": false,
"RequireUppercaseCharacters": false,
"RequireLowercaseCharacters": false,
"AllowUsersToChangePassword": false,
"ExpirePasswords": false,
"PasswordReusePrevention": 5
}
}
from this i need to extract "MinimumPasswordLength" and "PasswordReusePrevention" values such as 15 and 5 . Can anyone suggest me how to do or have any ideas?
Upvotes: 0
Views: 36
Reputation: 99
aws iam get-account-password-policy --query "PasswordPolicy.MinimumPasswordLength"
aws iam get-account-password-policy --query "PasswordPolicy.PasswordReusePrevention"
For further reference.
Documentation link - Controlling command output from the AWS CL
Upvotes: 1