简体   繁体   English

如何使用Java代码从AWS获得EC2定价?

[英]How canI get EC2 pricing from AWS with Java code?

I'm trying to get the EC2 price from AWS in my Java project. 我正在尝试从Java项目中的AWS获得EC2价格。

Is there a way to retrieve this informations from AWS via code? 是否可以通过代码从AWS检索此信息?

  1. Grab a JSON file with EC2 prices ( https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonEC2/current/index.json ). 抓取具有EC2价格的JSON文件( https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonEC2/current/index.json )。
  2. Parse the JSON file in Java. 用Java解析JSON文件。 Here is an example from Oracle: http://www.oracle.com/technetwork/articles/java/json-1973242.html 这是来自Oracle的示例: http : //www.oracle.com/technetwork/articles/java/json-1973242.html

More on AWS Price List API: Using the AWS Price List API 有关AWS Price List API的更多信息: 使用AWS Price List API

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM