Sha256: 2fe82fd05e51a32f9506c4cf33172b1ac67864d4fa875dd5905654f2291c1d6b

Contents?: true

Size: 898 Bytes

Versions: 16

Compression:

Stored size: 898 Bytes

Contents

module Fog
  module AWS
    class EC2

      class SecurityGroup < Fog::Model

        attribute :group_description, 'groupDescription'
        attribute :group_name,        'groupName'
        attribute :ip_permissions,    'ipPermissions'
        attribute :owner_id,          'ownerId'

        def destroy
          connection.delete_security_group(@group_name)
          true
        end

        def reload
          new_attributes = security_groups.get(@group_name).attributes
          merge_attributes(new_attributes)
        end

        def save
          data = connection.create_security_group(@group_name, @group_description).body
          true
        end

        def security_groups
          @security_groups
        end

        private

        def security_groups=(new_security_groups)
          @security_groups = new_security_groups
        end

      end

    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
fog-0.0.25 lib/fog/aws/models/ec2/security_group.rb
fog-0.0.24 lib/fog/aws/models/ec2/security_group.rb
fog-0.0.23 lib/fog/aws/models/ec2/security_group.rb
fog-0.0.22 lib/fog/aws/models/ec2/security_group.rb
fog-0.0.21 lib/fog/aws/models/ec2/security_group.rb
fog-0.0.20 lib/fog/aws/models/ec2/security_group.rb
fog-0.0.19 lib/fog/aws/models/ec2/security_group.rb
fog-0.0.18 lib/fog/aws/models/ec2/security_group.rb
fog-0.0.17 lib/fog/aws/models/ec2/security_group.rb
fog-0.0.16 lib/fog/aws/models/ec2/security_group.rb
fog-0.0.15 lib/fog/aws/models/ec2/security_group.rb
fog-0.0.14 lib/fog/aws/models/ec2/security_group.rb
fog-0.0.13 lib/fog/aws/models/ec2/security_group.rb
fog-0.0.12 lib/fog/aws/models/ec2/security_group.rb
fog-0.0.11 lib/fog/aws/models/ec2/security_group.rb
fog-0.0.10 lib/fog/aws/models/ec2/security_group.rb