1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
module Fog
module AWS
class Compute
class Real
require 'fog/aws/parsers/compute/describe_account_attributes'
# Describe account attributes
#
# ==== Parameters
# * filters<~Hash> - List of filters to limit results with
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Hash>:
# * 'requestId'<~String> = Id of request
# * 'accountAttributeSet'<~Array>:
# * 'attributeName'<~String> - supported-platforms
# * 'attributeValueSet'<~Array>:
# * 'attributeValue'<~String> - Value of attribute
#
# {Amazon API Reference}[http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeAccountAttributes.html]
def describe_account_attributes(filters = {})
params = Fog::AWS.indexed_filters(filters)
request({
'Action' => 'DescribeAccountAttributes',
:idempotent => true,
:parser => Fog::Parsers::AWS::Compute::DescribeAccountAttributes.new
}.merge!(params))
end
end
class Mock
def describe_account_attributes(filters = {})
account_attributes = self.data[:account_attributes]
Excon::Response.new(
:status => 200,
:body => {
'requestId' => Fog::AWS::Mock.request_id,
'accountAttributeSet' => account_attributes
}
)
end
end
end
end
end
|