mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Merge branch 'master' of github.com:fog/fog into ready_exception
This commit is contained in:
commit
df9574d123
1 changed files with 16 additions and 2 deletions
|
@ -9,6 +9,14 @@ module Fog
|
||||||
#
|
#
|
||||||
# ==== Parameters
|
# ==== Parameters
|
||||||
# * filters<~Hash> - List of filters to limit results with
|
# * filters<~Hash> - List of filters to limit results with
|
||||||
|
# * filters and/or the following
|
||||||
|
# * 'AvailabilityZone'<~String> - availability zone of offering
|
||||||
|
# * 'InstanceType'<~String> - instance type of offering
|
||||||
|
# * 'InstanceTenancy'<~String> - tenancy of offering in ['default', 'dedicated']
|
||||||
|
# * 'OfferingType'<~String> - type of offering, in ['Heavy Utilization', 'Medium Utilization', 'Light Utilization']
|
||||||
|
# * 'ProductDescription'<~String> - description of offering, in ['Linux/UNIX', 'Linux/UNIX (Amazon VPC)', 'Windows', 'Windows (Amazon VPC)']
|
||||||
|
# * 'MaxDuration'<~Integer> - maximum duration (in seconds) of offering
|
||||||
|
# * 'MinDuration'<~Integer> - minimum duration (in seconds) of offering
|
||||||
#
|
#
|
||||||
# ==== Returns
|
# ==== Returns
|
||||||
# * response<~Excon::Response>:
|
# * response<~Excon::Response>:
|
||||||
|
@ -27,7 +35,13 @@ module Fog
|
||||||
#
|
#
|
||||||
# {Amazon API Reference}[http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeReservedInstancesOfferings.html]
|
# {Amazon API Reference}[http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeReservedInstancesOfferings.html]
|
||||||
def describe_reserved_instances_offerings(filters = {})
|
def describe_reserved_instances_offerings(filters = {})
|
||||||
params = Fog::AWS.indexed_filters(filters)
|
options = {}
|
||||||
|
for key in ['AvailabilityZone', 'InstanceType', 'InstanceTenancy', 'OfferingType', 'ProductDescription', 'MaxDuration', 'MinDuration']
|
||||||
|
if filters.is_a?(Hash) && filters.key?(key)
|
||||||
|
options[key] = filters.delete(key)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
params = Fog::AWS.indexed_filters(filters).merge!(options)
|
||||||
request({
|
request({
|
||||||
'Action' => 'DescribeReservedInstancesOfferings',
|
'Action' => 'DescribeReservedInstancesOfferings',
|
||||||
:idempotent => true,
|
:idempotent => true,
|
||||||
|
|
Loading…
Add table
Reference in a new issue