Created
July 3, 2017 19:06
-
-
Save y13i/95ee8bb82b10335eff435d4a5b99e3c1 to your computer and use it in GitHub Desktop.
AWS Price List API から価格情報を引いてくるツールを作った ref: http://qiita.com/y13i/items/ba8f85237e96a5c72ca5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ awsprice listOfferRegions -o AmazonEFS | |
[]awsprice.RegionCode{ | |
"ap-southeast-2", | |
"eu-west-1", | |
"us-east-1", | |
"us-east-2", | |
"us-west-2", | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ awsprice -f json listAttributes -p "Compute Instance" -r us-east-1 | jq ".instanceType | length" | |
77 | |
$ awsprice -f json listAttributes -p "Compute Instance" -r ap-northeast-1 | jq ".instanceType | length" | |
73 | |
$ awsprice -f json listAttributes -p "Compute Instance" -r eu-central-1 | jq ".instanceType | length" | |
56 | |
$ awsprice -f json listAttributes -p "Compute Instance" -r ap-south-1 | jq ".instanceType | length" | |
45 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ awsprice -f json listProductTerms -r ap-northeast-1 -a instanceType=x1.32xlarge -a operatingSystem=Linux -a preInstalledSw=NA -a tenancy=Dedicated --termType Reserved -t "PurchaseOption=All Upfront" -t LeaseContractLength=3yr -t OfferingClass=standard | jq ".[0].OfferTerms[0].PriceDimensions" | |
{ | |
"6BKDT7UNN25Z7CYZ.NQ3QZPMQV9.2TG2D8R56U": { | |
"RateCode": "6BKDT7UNN25Z7CYZ.NQ3QZPMQV9.2TG2D8R56U", | |
"Description": "Upfront Fee", | |
"BeginRange": "", | |
"EndRange": "", | |
"Unit": "Quantity", | |
"PricePerUnit": { | |
"USD": "142204" | |
}, | |
"AppliesTo": [] | |
}, | |
"6BKDT7UNN25Z7CYZ.NQ3QZPMQV9.6YS6EN2CT7": { | |
"RateCode": "6BKDT7UNN25Z7CYZ.NQ3QZPMQV9.6YS6EN2CT7", | |
"Description": "USD 0.0 per Linux/UNIX (Amazon VPC), x1.32xlarge instance-hour (or partial hour)", | |
"BeginRange": "0", | |
"EndRange": "Inf", | |
"Unit": "Hrs", | |
"PricePerUnit": { | |
"USD": "0.0000000000" | |
}, | |
"AppliesTo": [] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment