新しいAWS Price List API
このようなお客様のニーズに対応し、コスト管理や予算の計上などによりフォーカスしたツールの開発を促進するため、AWS Price List APIを発表します。このAPIによって、JSONとCSVのフォーマットで価格情報にアクセスできるようになり、必要に応じてこの情報をダウンロードして処理することが出来ます。更に、価格情報が変更される度に Amazon Simple Notification Service (SNS)を通じて通知を受けることも可能です。
価格情報はURLでアクセス可能です。URLの構造は次のようになっています:
https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/{offer_code}/current/index.{format}
formatにはjsonまたはcsvのいずれかを指定します。
サポートする全てのサービスのoffer codeとURLについては、Offer Index(https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/index.json)にアクセスすることで確認することが出来ます。このデータは次のように始まります (currentVersionUrl
の値は全てhttps://pricing.us-east-1.amazonaws.com
に関連付けられています):
{"formatVersion":"v1.0","disclaimer":"This pricing list is for informational purposes only. All prices are subject to the additional terms included in the pricing pages on http://aws.amazon.com. All Free Tier prices are also subject to the terms included at https://aws.amazon.com/free/","publicationDate":"2015-11-19T02:10:02Z","offers":{"AmazonS3":{"offerCode":"AmazonS3","currentVersionUrl":"/offers/V1.0/aws/AmazonS3/current/index.json"},"AmazonRedshift":{"offerCode":"AmazonRedshift","currentVersionUrl":"/offers/V1.0/aws/AmazonRedshift/current/index.json"},"AmazonEC2":{"offerCode":"AmazonEC2","currentVersionUrl":"/offers/V1.0/aws/AmazonEC2/current/index.json"},"AmazonCloudWatch":{"offerCode":"AmazonCloudWatch","currentVersionUrl":"/offers/V1.0/aws/AmazonCloudWatch/current/index.json"}}}
それぞれのAPIレスポンスは製品情報(product information)をと価格情報(pricing information)の2つのセクションを含んでいます。
{"formatVersion":"v1.0","disclaimer":"This pricing list is for informational purposes only. All prices are subject to the additional terms included in the pricing pages on http://aws.amazon.com. All Free Tier prices are also subject to the terms included at https://aws.amazon.com/free/","offerCode":"AmazonRDS","version":"20151001000000","publicationDate":"2015-11-15T04:02:20Z","products":{"FNR4GZ675EW5UXJW":{"sku":"FNR4GZ675EW5UXJW","productFamily":"Database Instance","attributes":{"servicecode":"AmazonRDS","location":"US West (Oregon)","locationType":"AWS Region","instanceType":"db.t2.small","currentGeneration":"Yes","instanceClass":"Burstable performance instances","vcpu":"1","memory":"2","piopsOptimized":"No","networkPerformance":"Low","engineCode":"10","databaseEngine":"SQL Server","databaseEdition":"Express","deploymentOption":"Single-AZ","usagetype":"USW2-InstanceUsage:db.t2.small","operation":"CreateDBInstance:0010"}},
全ての製品に対して、製品属性(product attributes)を付与しています。価格の確認が必要なプロダクトのSKUを探すために製品属性を利用することが出来ます。価格をより早く見つけるため、価格情報はSKUで索引付けされています。
こちらが先ほどの製品情報に関連する価格情報になります:
"FNR4GZ675EW5UXJW":{"FNR4GZ675EW5UXJW.JRTCKXETXF":{"offerTermCode":"JRTCKXETXF","sku":"FNR4GZ675EW5UXJW","effectiveDate":"2015-10-01T00:00:00Z","priceDimensions":{"FNR4GZ675EW5UXJW.JRTCKXETXF.6YS6EN2CT7":{"rateCode":"FNR4GZ675EW5UXJW.JRTCKXETXF.6YS6EN2CT7","rateType":"Fixed","description":"$0.044 per RDS T2 Small Instance hour (or partial hour) running SQL Server EX - LI","beginRange":"0","endRange":"Inf","unit":"Hrs","pricePerUnit":{"USD":"0.0440000000"},"appliesTo":[]}},"termAttributes":{}}},
今すぐ利用可能です
価格情報は既に利用可能ですので今日から使い始めることが可能です。この機能は北京リージョン(China)を除く全てのパブリックリージョンで利用可能です。無償利用枠、スポットインスタンス、AWS Marketplaceに関する情報は提供されません。
詳細については、Using the Price List APIをご確認ください。