Class: Fog::AWS::EC2::SecurityGroup
- Inherits:
-
Model
- Object
- Model
- Fog::AWS::EC2::SecurityGroup
show all
- Defined in:
- lib/fog/aws/models/ec2/security_group.rb
Instance Method Summary
collapse
Methods inherited from Model
aliases, attribute, #attributes, attributes, #collection, identity, #identity, #initialize, #inspect, #merge_attributes
Constructor Details
This class inherits a constructor from Fog::Model
Instance Method Details
#destroy ⇒ Object
12
13
14
15
|
# File 'lib/fog/aws/models/ec2/security_group.rb', line 12
def destroy
connection.delete_security_group(@group_name)
true
end
|
#reload ⇒ Object
17
18
19
20
21
|
# File 'lib/fog/aws/models/ec2/security_group.rb', line 17
def reload
if new_security_group = security_groups.get(@group_name)
merge_attributes(new_security_group.attributes)
end
end
|
#save ⇒ Object
23
24
25
26
|
# File 'lib/fog/aws/models/ec2/security_group.rb', line 23
def save
data = connection.create_security_group(@group_name, @group_description).body
true
end
|
#security_groups ⇒ Object
28
29
30
|
# File 'lib/fog/aws/models/ec2/security_group.rb', line 28
def security_groups
@security_groups
end
|