awscosts 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +18 -5
- data/Rakefile +2 -0
- data/fixtures/vcr_cassettes/AWSCosts_EC2ReservedInstances/Reserved_instances/in_the_us-east-1_region/EC2_type_of_linux.yml +1817 -0
- data/fixtures/vcr_cassettes/AWSCosts_EC2ReservedInstances/Reserved_instances/in_the_us-east-1_region/EC2_type_of_rhel.yml +1817 -0
- data/fixtures/vcr_cassettes/AWSCosts_EC2ReservedInstances/Reserved_instances/in_the_us-east-1_region/EC2_type_of_sles.yml +1817 -0
- data/fixtures/vcr_cassettes/AWSCosts_EC2ReservedInstances/Reserved_instances/in_the_us-east-1_region/EC2_type_of_windows.yml +1817 -0
- data/fixtures/vcr_cassettes/AWSCosts_EC2ReservedInstances/Reserved_instances/in_the_us-east-1_region/EC2_type_of_windows_with_sql.yml +1817 -0
- data/fixtures/vcr_cassettes/AWSCosts_EC2ReservedInstances/Reserved_instances/in_the_us-east-1_region/EC2_type_of_windows_with_sql_web.yml +1817 -0
- data/lib/awscosts/ec2.rb +5 -0
- data/lib/awscosts/ec2_elastic_ips.rb +44 -0
- data/lib/awscosts/ec2_reserved_instances.rb +1 -1
- data/lib/awscosts/version.rb +1 -1
- data/spec/awscosts/ec2_elastic_ips_spec.rb +15 -0
- data/spec/awscosts/ec2_reserved_instances_spec.rb +23 -15
- metadata +11 -8
data/README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
-
#
|
1
|
+
# AWSCosts
|
2
2
|
|
3
3
|
AWSCosts allows programmatic access to AWS pricing.
|
4
4
|
|
5
5
|
Useful for calculating the running costs of your fleet of EC2 instances and
|
6
6
|
associated services such as ELBs, RDS, CloudWatch, etc.
|
7
7
|
|
8
|
+
[](https://travis-ci.org/srbartlett/awscosts)
|
9
|
+
|
8
10
|
## Installation
|
9
11
|
|
10
12
|
Add this line to your application's Gemfile:
|
@@ -33,13 +35,14 @@ You can pass an argument to price to filter by the instance type.
|
|
33
35
|
|
34
36
|
### Reserved
|
35
37
|
|
36
|
-
To find the **upfront** price of reserving Windows instance for light utilization
|
38
|
+
To find the **upfront** price of reserving Windows instance for a one year term and light utilization
|
37
39
|
|
38
|
-
region.ec2.reserved(:windows, :light).upfront
|
40
|
+
region.ec2.reserved(:windows, :light).upfront(:one_year, :light)
|
39
41
|
|
40
|
-
To find the **hourly** price of a `m1.large` reserved Windows with SQL instance for
|
42
|
+
To find the **hourly** price of a `m1.large` reserved Windows with SQL instance for
|
43
|
+
a three year and medium utilization
|
41
44
|
|
42
|
-
region.ec2.reserved(:windows_with_sql, :medium).hourly('m1.large')
|
45
|
+
region.ec2.reserved(:windows_with_sql, :medium).hourly(:three_year, 'm1.large')
|
43
46
|
|
44
47
|
### ELB
|
45
48
|
|
@@ -81,6 +84,15 @@ To find the price of Amazon EBS standard volumes in the Ireland region.
|
|
81
84
|
|
82
85
|
`.price` also supports `:provisioned_iops` and `:snapshots_to_s3`
|
83
86
|
|
87
|
+
### EIP
|
88
|
+
|
89
|
+
To find the price of an non-attached Elastic IP address (EIP) per hour:
|
90
|
+
|
91
|
+
AWSCosts.region('eu-west-1').ec2.elastic_ips.price_non_attached_per_hour
|
92
|
+
|
93
|
+
Other pricing available for EIPs includes: `price_additional_per_hour`, `price_remap_first_100`,
|
94
|
+
`price_remap_over_100` and `price_one`
|
95
|
+
|
84
96
|
|
85
97
|
## Supported Services
|
86
98
|
|
@@ -93,6 +105,7 @@ The following AWS services are currently support (more to come):
|
|
93
105
|
* Elastic Load Balancer (ELB)
|
94
106
|
* Elastic Block Storage (EBS)
|
95
107
|
* Elastic MapReduce (EMR)
|
108
|
+
* Elastic IP Address (EIP)
|
96
109
|
* S3
|
97
110
|
|
98
111
|
EC2 platforms:
|