Class: Fog::AWS::Elasticache::SecurityGroup
- Defined in:
- lib/fog/aws/models/elasticache/security_group.rb
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
- #authorize_ec2_group(group_name, group_owner_id = owner_id) ⇒ Object
- #destroy ⇒ Object
- #ready? ⇒ Boolean
- #revoke_ec2_group(group_name, group_owner_id = owner_id) ⇒ Object
- #save ⇒ Object
Methods inherited from Model
#initialize, #inspect, #reload, #symbolize_keys, #to_json, #wait_for
Methods included from Fog::Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
Methods included from Core::DeprecatedConnectionAccessors
#connection, #connection=, #prepare_service_value
Methods included from Fog::Attributes::InstanceMethods
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #persisted?, #requires, #requires_one
Constructor Details
This class inherits a constructor from Fog::Model
Instance Method Details
#authorize_ec2_group(group_name, group_owner_id = owner_id) ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/fog/aws/models/elasticache/security_group.rb', line 30 def (group_name, group_owner_id=owner_id) requires :id requires :owner_id if group_owner_id.nil? data = service.( id, group_name, group_owner_id ) merge_attributes(data.body['CacheSecurityGroup']) end |
#destroy ⇒ Object
18 19 20 21 22 |
# File 'lib/fog/aws/models/elasticache/security_group.rb', line 18 def destroy requires :id service.delete_cache_security_group(id) true end |
#ready? ⇒ Boolean
14 15 16 |
# File 'lib/fog/aws/models/elasticache/security_group.rb', line 14 def ready? ec2_groups.all?{|ingress| ingress['Status'] == 'authorized'} end |
#revoke_ec2_group(group_name, group_owner_id = owner_id) ⇒ Object
39 40 41 42 43 44 45 46 |
# File 'lib/fog/aws/models/elasticache/security_group.rb', line 39 def revoke_ec2_group(group_name, group_owner_id=owner_id) requires :id requires :owner_id if group_owner_id.nil? data = service.revoke_cache_security_group_ingress( id, group_name, group_owner_id ) merge_attributes(data.body['CacheSecurityGroup']) end |
#save ⇒ Object
24 25 26 27 28 |
# File 'lib/fog/aws/models/elasticache/security_group.rb', line 24 def save requires :id requires :description service.create_cache_security_group(id, description) end |