Class: Fog::AWS::RDS::SecurityGroups
- Inherits:
-
Collection
- Object
- Collection
- Fog::AWS::RDS::SecurityGroups
- Defined in:
- lib/fog/aws/models/rds/security_groups.rb
Instance Method Summary collapse
- #all(filters = filters) ⇒ Object
-
#get(identity) ⇒ Object
Example: get(‘my_db_security_group’) # => model for my_db_security_group.
-
#initialize(attributes = {}) ⇒ SecurityGroups
constructor
A new instance of SecurityGroups.
- #new(attributes = {}) ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ SecurityGroups
Returns a new instance of SecurityGroups.
12 13 14 15 16 17 18 |
# File 'lib/fog/aws/models/rds/security_groups.rb', line 12 def initialize(attributes={}) self.filters ||= {} if attributes[:server] filters[:identifier] = attributes[:server].id end super end |
Instance Method Details
#all(filters = filters) ⇒ Object
20 21 22 23 24 |
# File 'lib/fog/aws/models/rds/security_groups.rb', line 20 def all(filters = filters) self.filters = filters data = service.describe_db_security_groups(filters).body['DescribeDBSecurityGroupsResult']['DBSecurityGroups'] load(data) # data is an array of attribute hashes end |
#get(identity) ⇒ Object
Example: get(‘my_db_security_group’) # => model for my_db_security_group
28 29 30 31 32 33 |
# File 'lib/fog/aws/models/rds/security_groups.rb', line 28 def get(identity) data = service.describe_db_security_groups(identity).body['DescribeDBSecurityGroupsResult']['DBSecurityGroups'].first new(data) # data is an attribute hash rescue Fog::AWS::RDS::NotFound nil end |
#new(attributes = {}) ⇒ Object
35 36 37 |
# File 'lib/fog/aws/models/rds/security_groups.rb', line 35 def new(attributes = {}) super end |