aws rds describe-db-instances --query 'DBInstances[*].{DBName:DBInstanceIdentifier,RunStatus:DBInstanceStatus,InstanceClass:DBInstanceClass,DBVersion:EngineVersion}' --output table
aws rds describe-db-instances --query 'DBInstances[*].{DBName:DBInstanceIdentifier,RunStatus:DBInstanceStatus,InstanceClass:DBInstanceClass,DBVersion:EngineVersion}' --output text|awk '{ print $2" " $1 }'|sort -nk1r
19.0.0.0.ru-2020-07.rur-2020-07.r1 ksksit2
19.0.0.0.ru-2020-07.rur-2020-07.r1 kskppte7
19.0.0.0.ru-2020-07.rur-2020-07.r1 kskppte6
19.0.0.0.ru-2020-07.rur-2020-07.r1 kskppte5
19.0.0.0.ru-2020-07.rur-2020-07.r1 kskdev01
19.0.0.0.ru-2020-04.rur-2020-04.r1 kskgold1
12.2.0.1.ru-2020-07.rur-2020-07.r1 ksksit2
12.2.0.1.ru-2020-07.rur-2020-07.r1 ksksit1
12.2.0.1.ru-2020-07.rur-2020-07.r1 kskppte1-20200720
12.2.0.1.ru-2020-07.rur-2020-07.r1 kskppte1
12.2.0.1.ru-2020-04.rur-2020-04.r1 ksksit1
other option to sort from High to Low :-
aws rds describe-db-instances --query 'DBInstances[*].{DBName:DBInstanceIdentifier,RunStatus:DBInstanceStatus,InstanceClass:DBInstanceClass,DBVersion:EngineVersion}' --output text|sort -nk2r
kskdev01 19.0.0.0.ru-2020-07.rur-2020-07.r1 db.t3.medium upgrading
kskppte5 19.0.0.0.ru-2020-07.rur-2020-07.r1 db.r5.2xlarge available
kskppte6 19.0.0.0.ru-2020-07.rur-2020-07.r1 db.m4.xlarge upgrading
kskppte7 19.0.0.0.ru-2020-07.rur-2020-07.r1 db.m4.large upgrading
kskgold1 19.0.0.0.ru-2020-04.rur-2020-04.r1 db.r5.2xlarge available
ksksit1 12.2.0.1.ru-2020-07.rur-2020-07.r1 db.t3.large stopped
kskppte1 12.2.0.1.ru-2020-07.rur-2020-07.r1 db.t3.large available
ksksit2 12.2.0.1.ru-2020-07.rur-2020-07.r1 db.t3.large available
ksksit1 12.2.0.1.ru-2020-04.rur-2020-04.r1 db.r5.large available
No comments:
Post a Comment