1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/aws/requests/compute/describe_account_attributes.rb
Eugene Howe e146962677 [aws|elb] add new style default security group
* AWS VPC enabled accounts have a new style security
  group separate from the 'amazon-elb-sg' group.
* added describe account attributes call
* use account attributes to determine elb security group
2013-08-08 09:52:19 -04:00

49 lines
1.5 KiB
Ruby

module Fog
module Compute
class AWS
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::Compute::AWS::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